HTML DOM Style borderRadius property
Examples
Add rounded corners to a div element:
try it"
Definition and Usage
borderRadius property is a shorthand property sets or returns four border-radius property.
Tip: This attribute allows you to add rounded corners to the elements!
Browser Support
IE9 +, Firefox, Chrome, Safari and Opera support borderRadius property.
grammar
Back borderRadius properties:
Setting borderRadius properties:
Note: for thefour values in accordance with the radius of the upper-left, upper right, lower right, lower left, in the order given. If the value of the left will be omitted, its value is consistent with the value in the upper right. If the value of the lower right will be omitted, its value is consistent with the value of the upper left. If the value of the upper right will be omitted, its value is consistent with the value of the upper left.
Property Value
值 | 描述 |
---|---|
length | 定义角的形状。默认值是 0。 |
% | 以 % 形式定义角的形状。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | 0 |
---|---|
return value: | String representing the border-radius property element. |
CSS version | CSS3 |
related articles
CSS Reference: border-RADIUS attribute