Home >Web Front-end >CSS Tutorial >div css3 border-radius rounded corners DIV rounded corners image rounded corners
The content this article brings to you is about the rounded corners of div css3 border-radius DIV rounded corner picture rounded corners. It has certain reference value. Friends in need can refer to it. I hope it helps you.
1. pCSS3 rounded words:
border-radius
2. Grammatical structure
p{border-radius:5px}
Set the four corners of the p object box to 5 pixels rounded corners
p{border-radius:5px 0;}
Set the upper left corner and lower right corner of the p object box to 5 pixels rounded corners, and the other two corners to 0 without rounded corners
p{border-radius:5px 5px 0 0;}
Set the upper left corner and upper right corner of the p object box to be 5px rounded, and the other two corners are 0 and not rounded.
3. Description:
border-radius: 3px 4px 5px 6px
represents Set the upper left corner of the object to be 3px rounded, the upper right corner to be 4px rounded, the lower right corner to be 5px rounded, and the lower left corner to be 6px rounded.
4. CSS rounded corner attribute analysis chart
pCSS5 sets rounded corners for two p boxes and one picture for rounded corners Practice CSS3 Rounded corners.
1. Case HTML code
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>对象圆角 在线演示 DIVCSS5 VIP</title> <link href="images/style.css" rel="stylesheet" type="text/css" /> <!-- www.divcss5.com --> </head> <body> <div>盒子左上角和右上角对象圆角测试</div> <div class="box">DIV盒子圆角</div> <div>盒子对象个角圆角测试</div> <div class="box3">DIV盒子圆角</div> <p> </p> <div>图片对象圆角测试</div> <div class="box2"><img src="images/logo.gif" /></div> </body> </html>
2. Case CSS code:
.box {border-radius:5px 5px 0 0;border:1px solid #000;width:300px; height:80px; margin:0 auto} .box2 img{border-radius:5px} .box3{border-radius:5px 0; background:#999;width:300px; height:80px; margin:0 auto}
3. Case description
1), first In order to observe the rounded corner effect, the BOX box sets the border style, and also sets the rounded corner style border-radius: 5px 5px 0 0; sets the upper left corner and upper right corner rounded corners.
2), set the background color of the second BOX3 box, and set the rounded corner style border-radius: 5px 0, set the upper left corner and lower right corner rounded corners
3), the third Set the rounded corner style border-radius:5px to the image img in the box2 box, and set the four corners to be rounded.
The above is the complete introduction. If you want to know more about CSS3 video tutorial, please pay attention to the PHP Chinese website.
The above is the detailed content of div css3 border-radius rounded corners DIV rounded corners image rounded corners. For more information, please follow other related articles on the PHP Chinese website!