Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Container borderRadius covered by sub view, Is this a bug?

Tags:

react-native

the screenshot:

enter image description here

In the root view, I set borderRadius is 17, it display well on right, but on the left, the border radius covered by green sub view and yellow sub view, is this a bug?

like image 540
Bronts Avatar asked Dec 16 '15 13:12

Bronts


People also ask

Why border radius is not working?

If there are contents within the div that has the curved corners, you have to set overflow: hidden because otherwise the child div's overflow can give the impression that the border-radius isn't working. This answer worked for me.

How do you create a rounded container in flutter?

In flutter, it is simple to create an easy rectangle and sq. form using container widget however they need sharp edges and therefore the corner is sharp however using the BoxDecoration property of box decoration we are able to simply and make the perimeters rounded. Container( decoration: BoxDecoration( border: Border.


2 Answers

Set {overflow: 'hidden'} on the root view's style.

like image 115
Bronts Avatar answered Oct 17 '22 02:10

Bronts


On Android overflow on parent elements won't clip children. It is a known issue:

https://facebook.github.io/react-native/releases/0.23/docs/known-issues.html

like image 31
Dan G Nelson Avatar answered Oct 17 '22 02:10

Dan G Nelson