用CSS写 > 和 √ 符号
2018-02-23 18:55
204 查看
用CSS写带背景色的 > 、< 、……
用CSS写带背景色的 √
用CSS写带背景色的 ×
html: <span class="icon"> <i class="arrow"></i> </span> css: .icon{ position:relative; display:inline-block; width:20px; height:20px; background-color:#eee; border-radius:50%; vertical-align:top; } .arrow{ display:block; position:relative; width:12px; //10px height:12px; //10px top:0; //2px left:4px; //5px -webkit-transform:rotate(-45deg); } .arrow::before,.arrow::after{ position:absolute; content:''; left:0; bottom:0; background-color:#fff; } .arrow::before{ width:2px; height:8px; } .arrow::after{ width:9px; height:2px; }
用CSS写带背景色的 √
html: <span class="icon"> <i class="arrow"></i> </span> css: .icon{ position:relative; display:inline-block; width:20px; height:20px; background-color:#59d37b; border-radius:50%; vertical-align:top; } .arrow{ display: block; position: relative; top: 6px; left: 5px; height: 6px; width: 11px; -webkit-transform: rotate(-45deg); } .arrow::before,.arrow::after{ position:absolute; content:''; left:0; bottom:0; background-color:#fff; } .arrow::before{ width: 2px; height: 6px; } .arrow::after{ width: 11px; height: 2px; }
用CSS写带背景色的 ×
html: <span class="icon"> <i class="arrow"></i> </span> css: .icon{ position:relative; display:inline-block; width:20px; height:20px; background-color:red; border-radius:50%; vertical-align:top; } .arrow{ display: block; position: relative; top: 5px; left: 7px; height: 11px; width: 10px; -webkit-transform: rotate(-45deg); } .arrow::before,.arrow::after{ position:absolute; content:''; background-color:#fff; } .arrow::before{ width: 2px; height: 12px; left: 3px; top: -2px; } .arrow::after{ width: 12px; height: 2px; top: 3px; left: -2px; }
相关文章推荐
- CSS中>,+,~,空格,逗号等符号的使用
- CSS的“>”符号
- <!--内容//-->请问在CSS里面,这个符号是什么 意思?
- CSS的“*”、“>”和“_”符号 IE6、IE7、IE8与Firefox的CSS兼容
- Android环境下关于kconfig,.config的解读及meneconfig 相关符号说明[M],{*},< >,-*-
- 一天一篇批处理之——Part6: 常用的符号命令 “*” “?” “<” “>” “>>” “|”
- 处理--->错误 error LNK2019: 无法解析的外部符号"~~~~" | 该符号"~~~"在函数 _main 中被引用
- <css>3D视图
- WEB:CSS风格属性如何转换为脚本语言标识符号
- 一种排序 set<stl> 无重复 + < 符号重载 ==
- 区别CSS中display:box;inline;none以及HTML中 <frame> 标签<table> 标签的 frame 属性
- <div+css页面布局课堂笔记>1---div+css对页面布局的优势
- PLSQL中的两种传参方式:Positional Notation VS Named Notation(即=>符号)
- Div+css布局之<img>和<a>底部对齐
- JavaScript位移运算符(无符号) >>> 三个大于号 的使用方法详解
- =>符号的理解
- CSS符号属性
- HTML5 codecademy <div>块 <span> CSS文件
- 分析轮子(二)- << ,>>,>> (左移、右移、无符号右移)
- 将整数转换为相应的一个字符数组。 分析:从个位提取数字,组合字符 符号位的处理 12345=>"12345"