用纯CSS3怎样制作常见的小的三角箭头
Admin 2022-07-09 群英技术资讯 567 次浏览
用纯CSS3实现网页中常见的小箭头,实现代码如下所示:
/* css3三角形(向上 ▲) */ div.arrow-up { width:0px; height:0px; border-left:5px solid transparent; /* 右透明 */ border-right:5px solid transparent; /*右透明 */ border-bottom:5px solid #2f2f2f; /* 定义底部颜色 */ font-size:0px; line-height:0px; } /* css3三角形(向下 ▼) */ div.arrow-down { width:0px; height:0px; border-left:5px solid transparent; border-right:5px solid transparent; border-top:5px solid #2f2f2f; font-size:0px; line-height:0px; } /* css3三角形(向左) */ div.arrow-left { width:0px; height:0px; border-bottom:5px solid transparent; /* left arrow slant */ border-top:5px solid transparent; /* right arrow slant */ border-right:5px solid #2f2f2f; /* bottom, add background color here */ font-size:0px; line-height:0px; } /* css3三角形(向右) */ div.arrow-rightright { width:0px; height:0px; border-bottom:5px solid transparent; /* left arrow slant */ border-top:5px solid transparent; /* right arrow slant */ border-left:5px solid #2f2f2f; /* bottom, add background color here */ font-size:0px; line-height:0px; }
总结
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
CSS框架的缺点包括哪些呢?对于CSS框架大家应该都比较熟悉,虽然CSS框架有很多优点,但是也是有缺点的,那么是什么呢?
这篇文章主要介绍了AmazeUI 网格的实现示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
这篇文章主要介绍了CSS3 mask 遮罩的具体使用方法,详细的介绍了CSS3 mask 遮罩的具体使用,具有一定的参考价值,有兴趣的可以了解一下
在css中,可以利用“letter-spacing”属性使英文字母分开写,该属性用于设置字符间的间距,只需要给英文字母元素添加“letter-spacing:间距值;”样式即可。
不依赖javascript,直接使用纯css实现 svg 的描边绘制动画效果,本文通过实例代码给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友参考下吧
成为群英会员,开启智能安全云计算之旅
立即注册Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008