[英]How to overlay Text Strip above Image in React Native
I'm not familiar with react-native but as far as I read you can provide styles as an object with any css property in camelCase notation: You can use clip-path to cut away the slanted part.
// regular css
clip-path: polygon(0 0, 0 100%, 96% 100%, 100% 0);
在 react-native
const styles = {
theStrip: {
clipPath: 'polygon(0 0, 0 100%, 96% 100%, 100% 0)',
}
}
<div styles={styles.theStrip} />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.