diff --git a/zh-cn/react-native-snap-carousel.md b/zh-cn/react-native-snap-carousel.md index f0c4587ce901909b6de394c0dc265c2f842062db..4dd55152ab0dbb7fab0a9376ca0907665d060ec6 100644 --- a/zh-cn/react-native-snap-carousel.md +++ b/zh-cn/react-native-snap-carousel.md @@ -39,7 +39,7 @@ $ npm install @types/react-native-snap-carousel ```js import React, { useState } from "react"; -import { View, Text, Image } from "react-native"; +import { View, Text, Image, StyleSheet } from "react-native"; import Carousel from "react-native-snap-carousel"; export default function SnapCarouselExample(): JSX.Element { @@ -103,6 +103,13 @@ const styles = StyleSheet.create({ width: "100%", marginBottom: 20, }, + image: { + resizeMode: 'cover', + borderTopLeftRadius: 8, + borderTopRightRadius: 8, + width: 250, + height: 300 + } }); ```