1
A
回答
0
您可以顯示一個白色三角形View
在圖片上方
import React from 'react';
import { StyleSheet, View, Image, Dimensions } from 'react-native';
export default class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Image style={styles.img} source={require('./images.jpg')} >
<View style={[styles.triangle]} /></Image>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
triangle: {
position: 'absolute',
right: 0,
bottom: 0,
width: 0,
height: 0,
backgroundColor: 'transparent',
borderStyle: 'solid',
borderLeftWidth: Dimensions.get('window').width,
borderRightWidth: 0,
borderBottomWidth: 50,
borderLeftColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: '#fff',
},
img: {
width: Dimensions.get('window').width,
},
});
相關問題
- 1. 在Matlab中反轉和切割圖像
- 2. 圓角問題與反應本機Android中的GIF圖像
- 3. c# - 如何從圖像中切割三角形?
- 4. 對角線切割ImageView
- 5. 如何在反應本機中做切換卡(設計)?
- 6. 在圖像中切角PHP
- 7. 反應本機圖像不顯示
- 8. onLayout與圖像 - 反應本機
- 9. 反應本機圖像高度(全寬)
- 10. 反應本機檢測加載圖像
- 11. 如何根據座標切割圖像
- 12. 如何在特定位置的圖像頂部設置反應本機圖像
- 13. Javascript/jQuery圖像切割器
- 14. OpenCV,從圖像切割件
- 15. 如何使用ImageMagick對選擇圖像進行切割
- 16. 如何查詢領域中的隨機對象反應本機
- 17. Android和iOS在反應本機中的圖像尺寸
- 18. GIF圖像沒有在反應本機中顯示動畫
- 19. 如何添加多個圖像使用反應本機圖像選擇器
- 20. 圖像資源從反應本機應用程序中消失
- 21. SplashScreen在本機反應中
- 22. 如何製作切角圖像?
- 23. 在反應本機
- 24. Android佈局對角線切割
- 25. TranslateAnimation在Imageview外部切割圖像
- 26. 如何從反應本機JavaScript語法切換到es6
- 27. 從圖像切割x像素
- 28. 絕對定位在反應本機
- 29. 大圖不顯示在反應本機
- 30. 緩存的圖像不顯示在我的ListView - 反應本機