纯CSS实现小箭头的方法

纯CSS实现小箭头的方法,第1张

概述我们大多数的小箭头都是用小图片来做的,这里分享一款用纯CSS写的小箭头,大家可以看看,以后会放出更多的CSS小箭头来供大家参考。

下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。内存溢出小编现在分享给大家,也给大家做个参考。@H_403_1@

我们大多数的小箭头都是用小图片来做的,这里分享一款用纯 CSS 写的小箭头,大家可以看看,以后会放出更多的 CSS 小箭头来供大家参考。@H_403_1@

<div >@H_403_1@

<div >@H_403_1@

<div ></div>@H_403_1@

<div ></div>@H_403_1@

</div>@H_403_1@

</div>@H_403_1@

<style>@H_403_1@

.pre-wrap {@H_403_1@

wIDth: 200px;@H_403_1@

height: 120px;@H_403_1@

margin: 50px auto 0;@H_403_1@

border: 2px solID #F00;@H_403_1@

border-radius: 4px;@H_403_1@

position: relative;@H_403_1@

}@H_403_1@

.pre {@H_403_1@

wIDth: 80px;@H_403_1@

height: 80px;@H_403_1@

position: absolute;@H_403_1@

top: 20px;@H_403_1@

left: 40px;@H_403_1@

}@H_403_1@

.pre1 {@H_403_1@

border-wIDth: 40px;@H_403_1@

border-color: transparent #F30 transparent transparent;@H_403_1@

}@H_403_1@

.pre2 {@H_403_1@

border-wIDth: 40px;@H_403_1@

border-color: transparent #FFF transparent transparent;@H_403_1@

position: relative;@H_403_1@

top: -80px;@H_403_1@

left: 15px;@H_403_1@

}@H_403_1@

.pre1,.pre2 {@H_403_1@

/*****设置border-style:dashed;使ie6支持border透明*****/@H_403_1@

border-style: dashed solID dashed dashed;@H_403_1@

/*****设置容器宽高为0*****/@H_403_1@

wIDth: 0;@H_403_1@

height: 0;@H_403_1@

/*****去掉ie6下默认高度,设置以下属性*****/@H_403_1@

line-height: 0;@H_403_1@

Font-size: 0;@H_403_1@

overflow: hIDden;@H_403_1@

 @H_403_1@

}@H_403_1@

</style>@H_403_1@

代码预览@H_403_1@

<div >@H_403_1@

<div >@H_403_1@

<div ></div>@H_403_1@

<div ></div>@H_403_1@

</div>@H_403_1@

</div>@H_403_1@

<style>@H_403_1@

.pre-wrap {@H_403_1@

wIDth: 200px;@H_403_1@

height: 120px;@H_403_1@

margin: 50px auto 0;@H_403_1@

border: 2px solID #F00;@H_403_1@

border-radius: 4px;@H_403_1@

position: relative;@H_403_1@

}@H_403_1@

.pre {@H_403_1@

wIDth: 80px;@H_403_1@

height: 80px;@H_403_1@

position: absolute;@H_403_1@

top: 20px;@H_403_1@

left: 40px;@H_403_1@

}@H_403_1@

.pre1 {@H_403_1@

border-wIDth: 40px;@H_403_1@

border-color: transparent #F30 transparent transparent;@H_403_1@

}@H_403_1@

.pre2 {@H_403_1@

border-wIDth: 40px;@H_403_1@

border-color: transparent #FFF transparent transparent;@H_403_1@

position: relative;@H_403_1@

top: -80px;@H_403_1@

left: 15px;@H_403_1@

}@H_403_1@

.pre1,.pre2 {@H_403_1@

/*****设置border-style:dashed;使ie6支持border透明*****/@H_403_1@

border-style: dashed solID dashed dashed;@H_403_1@

/*****设置容器宽高为0*****/@H_403_1@

wIDth: 0;@H_403_1@

height: 0;@H_403_1@

/*****去掉ie6下默认高度,设置以下属性*****/@H_403_1@

line-height: 0;@H_403_1@

Font-size: 0;@H_403_1@

overflow: hIDden;@H_403_1@

}@H_403_1@

</style>@H_403_1@

以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。@H_403_1@ 总结

以上是内存溢出为你收集整理的纯CSS实现小箭头的方法全部内容,希望文章能够帮你解决纯CSS实现小箭头的方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1095970.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存