首页 > Web开发 > 详细

CSS组件化之实心三角形

时间:2017-08-23 21:19:20      阅读:298      评论:0      收藏:0      [点我收藏+]

技术分享

//等腰上三角
.top-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 100px 120px 100px;
    border-color: transparent transparent #007bff transparent;
}
//右上三角
.right-top-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 120px 120px 0;
    border-color: transparent #007bff transparent transparent;
}
//等腰右三角
.top-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 100px 0 100px 120px;
    border-color: transparent transparent transparent #007bff;
}
//右下三角
.right-bottom-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 120px 120px;
    border-color: transparent transparent #007bff transparent;
}
// 等腰下三角
.bottom-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 120px 100px 0 100px;
    border-color: #007bff transparent transparent transparent;
}
// 左下三角
.left-bottom-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 120px 0 0 120px;
    border-color: transparent transparent transparent #007bff;
}
//等腰左三角
.left-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 100px 120px 100px 0;
    border-color: transparent #007bff transparent transparent;
}
//左上三角
.left-top-triangle {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 120px 120px 0 0;
    border-color: #007bff transparent transparent transparent;
}

 

CSS组件化之实心三角形

原文:http://www.cnblogs.com/camille666/p/css_plugins_triangle.html

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