Friday, July 8, 2011

Rounded Corners in CSS3

Supporting Browsers: Apple Safari 3, Firefox 1, Google Chrome 1

CSS3
Mozilla
WebKit
border-top-right-radius
-moz-border-radius-topright
-webkit-border-top-right-radius
border-bottom-right-radius
-moz-border-radius-bottomright
-webkit-border-bottom-right-radius
border-bottom-left-radius
-moz-border-radius-bottomleft
-webkit-border-bottom-left-radius
border-top-left-radius
-moz-border-radius-topleft
-webkit-border-top-left-radius
border-radius
-moz-border-radius
-webkit-border-radius

Here is example for Rounded Corner in CSS3

<div class="content-box">
  <h2>Four Corners</h2>
  <p>This box has all corners rounded.</p>
</div>

<style type="text/css">
.content-box {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #AFAFAF;
    border-radius: 5px 5px 5px 5px;
    height: 200px;
    margin: 10px auto 0;
    width: 600px;
}
</style>

No comments:

Post a Comment