CSS Property border-top-right-radius








border-top-right-radius sets the size of the round corner.

Summary

ItemValue
Initial value 0
Inherited no
Version CSS3
JavaScript syntax object.style.borderTopRightRadius="5px"

CSS Syntax

border-top-right-radius: length|% [length|%];




Property Values

The property values are listed in the following table.

ValueDescription
length set the length for radius
% set percentage size for radius

Browser compatibility

border-top-right-radius Yes 9.0 Yes Yes Yes

Example

An example showing how to use border-top-right-radius CSS property.

<!DOCTYPE html>
<html>
<head>
<style> 
div<!--   ww  w  .  ja v a 2s .c om-->
{
    border:2px solid;
    padding:10px;
    background:#dddddd;
    border-top-right-radius:2em;
}
</style>
</head>
<body>

<div>a rounded border.</div>

</body>
</html>

Click to view the demo