利用css来画出各种样式不同的梯形


本文摘自PHP中文网,作者V,侵删。

首先我们要知道一下四个非常重要的样式:

(学习视频分享:css视频教程)

border-buttom:设置下边框

border-top:

border-left:

border-right:

1

<div class="mask"></div>

1

2

3

4

5

6

7

.mask

{

    height: 0;

    width: 100px;

    border-top: 100px solid red;

    border-right: 37px solid transparent;

}

1c32b63dbcef045c368b84b5959685f.png

1

2

3

4

5

6

7

8

.mask

        {

            width:100px;

            height:0;

            border-width:0 37px 100px 37px;

            border-style:none solid solid;

            border-color:transparent transparent red;

        }

cdfb4cb991e755ed4934664c5dc8c5e.png

1

2

3

4

5

6

7

8

.mask

        {

            width:100px;

            height:0;

            border-top: 100px solid red;

            border-right: 37px solid transparent;

            border-left:37px solid transparent;

        }

88f43cbaedb5e9d679e7c8962ad3ac4.png

1

2

3

4

5

6

7

.mask

       {

           width:100px;

           height:0;

           border-top:100px solid red;

           border-left:37px solid transparent;

       }

de0e78339829ae11e227762973f5220.png

阅读剩余部分

相关阅读 >>

css 9pt等于多少px

css的优势是什么

css怎么加注释?

怎么给css文件改名

css中设置边框可以用哪些属性

css比html更复杂为什么还要用?

border-collapse属性怎么用

如何解决css英文不自动换行的问题

css3 flexbox该怎么使用?

html5实践-使用css装饰图片画廊的代码分享(二)

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...