开发者社区> 问答> 正文

css怎么写梯形

css怎么写梯形

展开
收起
云计算小粉 2018-05-10 20:07:00 2420 0
2 条回答
写回答
取消 提交回答
  • { border-bottom: 100px solid red; border-left: 25px solid transparent; border-right: 25px solid transparent; height: 0; width: 100px; }

    2020-03-31 22:45:19
    赞同 展开评论 打赏
  • 通过css3的特性可以实现:
    .t0{

        border-bottom: 80px solid #fb3;
        border-left: 30px solid transparent;
        border-right: 30px solid transparent;
        height: 0;
        width: 80px;
        margin: 0 0 10px 0;
      }
    
      .t1{
        border-radius: .3em .3em 0 0;
        margin: 10px;
        height: 30px;
        width: 80px;
        background: #fb5;
        transform-origin: bottom;
        transform: scaleY(1.1) perspective(.3em) rotateX(3deg);
      }
    2019-07-17 22:14:31
    赞同 展开评论 打赏
问答分类:
问答标签:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
零基础CSS入门教程 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载