Home>Article>Web Front-end> div css3 border-radius rounded corners DIV rounded corners image rounded corners

div css3 border-radius rounded corners DIV rounded corners image rounded corners

云罗郡主
云罗郡主 forward
2018-10-16 13:59:40 2612browse


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. css3 words and grammatical structure

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

2. CSS3 rounded corner case

pCSS5 sets rounded corners for two p boxes and one picture for rounded corners Practice CSS3 Rounded corners.

1. Case HTML code

    对象圆角 在线演示 DIVCSS5 VIP   
盒子左上角和右上角对象圆角测试
DIV盒子圆角
盒子对象个角圆角测试
DIV盒子圆角

图片对象圆角测试

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 aboutCSS3 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!

Statement:
This article is reproduced at:divcss5.com. If there is any infringement, please contact admin@php.cn delete