2015-11-06 43 views
0

我試圖繞過我的廣場景觀的角落,但發現角落邊框半徑道具無法正常工作。我已嘗試所有四個(borderTopLeftRadius,borderTopRightRadius,borderBottomLeftRadius,borderBottomRightRadius),但沒有任何作品。雖然道具工作正常,但borderRadius。我在Mac OS上使用RN 0.12。borderTopLeftRadius和其他3角落半徑同行不工作

代碼片段如下。

name ='Button' 
style = {{flex:1, backgroundColor:'white',borderBottomLeftRadius:30, borderBottomRightRadius:30, height:75,width:345 }}> 

回答

0

你需要添加邊框寬度

style = {{flex:1, backgroundColor: 'white',borderBottomLeftRadius: 30, borderBottomRightRadius:30, height: 75,width: 345, borderWidth: 1 }} 
+0

我試過,但除了圍繞箱只增加了深色邊框,它仍然沒有圓盒子的角落。我可以知道上述代碼的系統和RN版本信息嗎? – ZJL

+0

你需要在另一個''''''中包裝,而不是在主''''View style = {{flex:1}} />'''''''''''裏面,我相信你試圖繞過主屏幕的一角查看 – syarul

+0

你的意思是我應該做下面的事情嗎? <查看樣式= {{borderBottomLeftRadius:30}}>測試我試過這個,但仍然不是圓角。我可以知道你的平臺是Android嗎? – ZJL

相關問題