700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > html5 div 拱桥形状制作 纯CSS3+DIV实现小三角形边框效果的示例代码

html5 div 拱桥形状制作 纯CSS3+DIV实现小三角形边框效果的示例代码

时间:2024-04-19 06:38:49

相关推荐

html5 div 拱桥形状制作 纯CSS3+DIV实现小三角形边框效果的示例代码

具体代码如下所示:

html代码是这样的

下面用CSS3分别实现向上、下、左、右的三角形

/*箭头向上*/

.arrow-up {

width:0;

height:0;

border-left:30px solid transparent;

border-right:30px solid transparent;

border-bottom:30px solid #fff;

}

/*箭头向下*/

.arrow-down {

width:0;

height:0;

border-left:20px solid transparent;

border-right:20px solid transparent;

border-top:20px solid #0066cc;

}

/*箭头向左*/

.arrow-left {

width:0;

height:0;

border-top:30px solid transparent;

border-bottom:30px solid transparent;

border-right:30px solid yellow;

}

/*箭头向右*/

.arrow-right {

width:0;

height:0;

border-top:50px solid transparent;

border-bottom: 50px solid transparent;

border-left: 50px solid

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。