用纯CSS3怎样制作常见的小的三角箭头
Admin 2022-07-09 群英技术资讯 751 次浏览
用纯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进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
css3的transform缩放在IE浏览器下有抖动怎么解决?因为浏览器的兼容问题,transform: scale();缩放在IE浏览器下会有过渡抖动的问题,那么我们有什么办法可以解决吗?接下来小编就与大家一起来探讨一下。
这篇文章主要介绍了CSS flex-basis 文本溢出问题的解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
一、多重背景图片①CSS3允许我们在一个元素上添加多个图片②多重背景可以把多个图片资源添加到background属性上,用逗号隔开,然后用background-position把他们定位到你想要的位置<divclass="box"></div>.box{width:600px;height:200px;border:1pxsol
方法:1、给元素添加“background-repeat:no-repeat”样式,设置背景只显示一次;2、利用“background-size”属性设置背景只显示一半,语法为“元素{background-size:50% 100%}”。
这篇文章主要给大家分享css盒子的隐藏和显示效果的实现,需求就是常规就是隐藏效果,显示的时候显示在最上层,例如下面小米电视机这种选购效果,那么这样的隐藏和显示效果怎样做呢?我们直接来看代码:
成为群英会员,开启智能安全云计算之旅
立即注册Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008