Reputation: 3130
In general, is it more efficient to use percentages or pixel/em values for border-radii?
For an example: for a square image 200px by 200px, which out of border-radius:50%
or border-radius:100px
is best? Obviously percentages for circles are easier to manage, but are percentages significantly harder to calculate? Are there any caveats?
This question is assuming the use of a compatible browser, and static-sized images.
Upvotes: 6
Views: 1019
Reputation: 770
I prefer to user percentage values because if I change size of my image, I don't need change my border-radius. But in MDN site you can read this bugs about percentage value:
percentage values
Check this link for more info: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#_values
Upvotes: 3