当前在线人工客服
天达云-技术
QQ:1324027256
天达云-技术
QQ:1902643386
天达云-售前
QQ:1650874901
天达云-售前
QQ:2207995833
天达云-合作
QQ:1984186903
天达云微信小程序
400-837-6568

如何利用css来画出各种样式不同的梯形
更新:HHH   时间:2023-1-7


这篇文章将为大家详细讲解有关如何利用css来画出各种样式不同的梯形,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

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

border-buttom:设置下边框

border-top:

border-left:

border-right:

<div class="mask"></div>
.mask
{
    height: 0;
    width: 100px;
    border-top: 100px solid red;
    border-right: 37px solid transparent;
}

.mask
        {
            width:100px;
            height:0;
            border-width:0 37px 100px 37px;
            border-style:none solid solid;
            border-color:transparent transparent red;
        }

.mask
        {
            width:100px;
            height:0;
            border-top: 100px solid red;
            border-right: 37px solid transparent;
            border-left:37px solid transparent;
        }

 .mask
        {
            width:100px;
            height:0;
            border-top:100px solid red;
            border-left:37px solid transparent;
        }

还有一些奇怪的图形 自己开发去。

.mask
        {
            width:100px;
            height:0;
            border-bottom:100px solid red;
            border-left:37px solid transparent;
            margin-left: -30px;
        }

关于“如何利用css来画出各种样式不同的梯形”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

返回web开发教程...