CSS制作箭头图标代码(圆,三角形,椭圆)
2016-03-30 11:07
816 查看
css3功能非常强大,之前需要图片完成的icon,现在我们只需要几段css代码就可以实现此功能。下面给大家分享纯css制作的圆,椭圆,三角形箭头图标,非常使用,需要的朋友参考下吧
圆:
椭圆
箭头:
三角形:
CSS Code复制内容到剪贴板
圆:
.yuan{ width:100px; height:100px; -moz-border-radius:50%; -webkit-border-radius:50%; border-radius:50%; background-color:red; } <div class="yuan"></div>
椭圆
.oval { width: 200px; height: 100px; background-color: red; -moz-border-radius: 100px / 50px; -webkit-border-radius: 100px / 50px; border-radius: 100px / 50px; } <div class="oval"></div>
箭头:
.arrow{ content: ''; position: absolute; width: 30px; height: 30px; border: 10px solid #f5b24a; -webkit-transform: rotate(-135deg); -moz-transform: rotate(-135deg); -o-transform: rotate(-135deg); -ms-transform: rotate(-135deg); transform: rotate(-135deg); border-top: none; border-right: none; top: 9px; } <span class="arrow"></span>
三角形:
CSS Code复制内容到剪贴板
.rencentle { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; } <div class="rencentle"></div>
相关文章推荐
- Web布局连载——两栏固定布局(五)
- [div+css]晒晒最新制作专题推广页模板
- 盒子模型
- CSS选择器
- CSS样式优先权
- [css] line-height 百分比单位和数值单位的区别
- Apple官网研究之使用Justify布局导航
- 设计更快的网页(三):字体和 CSS 调整
- 纯CSS制作的新闻网站中的文章列表
- 10条影响CSS渲染速度的写法与使用建议第1/3页
- BS项目中的CSS架构_仅加载自己需要的CSS
- 很不错的 CSS Hack 又学了一招
- 发一个css比较清爽的写法
- CSS expression控制图片自动缩放效果代码[兼容 IE,Firefox]
- css布局网页水平居中常用方法
- CSS经典技巧十则第1/2页
- css 兼容性问题this.style.cursor=''hand''
- IE6不能正常解析CSS文件问题的解决方法及原因分析
- 欲练CSS ,必先解决IE的一些细节分析
- CSS文字截取功能实现代码