gpt4 book ai didi

css - react native : Setting the width of a view equal to its height when using percentages

转载 作者:技术小花猫 更新时间:2023-10-29 10:54:59 33 4
gpt4 key购买 nike

我有这个样式表,当我将高度设置为百分比时,我试图使它的宽度等于高度。我以下没有成功:

art: {
height: "70%",
width: styles.podcastArt.height,
marginRight:10,
marginTop:10,
marginBottom:10,
},

任何想法或方向都会有所帮助。谢谢!

最佳答案

设置宽高比:1

art: {
height: "70%",
aspectRatio: 1,
marginRight:10,
marginTop:10,
marginBottom:10,
},

关于css - react native : Setting the width of a view equal to its height when using percentages,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47366871/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com