首页 > Web开发 > 详细

CSS3 border属性的妙用

时间:2015-11-19 14:52:37      阅读:321      评论:0      收藏:0      [点我收藏+]
.ribbon {
        background: #45c9c8;
        position: absolute;
        width: 75px;
        height: 25px;
        line-height: 25px;
        top: -4px;
        left: -11px;
        font-size: 14px;
        color: #fff;
        text-align: center;
        font-style: normal;
        z-index: 1;
        &:after{
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            border-left: 12px solid transparent;
            border-top: 5px solid #329c9b;
            top: 25px;
            left: 0px;
            z-index: 0;
        }
        &:before{
            content: "";
            position: absolute;
            right: -10px;
            font-size: 14px;
            color: #fff;
            z-index: 1;
            width: 0;
            height: 0;
            border-top: 13.5px solid #45c9c8;
            border-left: 5px solid #45c9c8;
            border-right: 10px solid transparent;
            border-bottom: 12.5px solid #45c9c8;
        }
    }

  利用伪选择器after和before写了一个丝带标签

CSS3 border属性的妙用

原文:http://www.cnblogs.com/goodbeypeterpan/p/4977382.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!