[英]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.