CSS实现小图标
关闭图标
.close { position: relative; display: inline-block; width: 12px; height: 12px; } .close:before { content: ''; display: inline-block; position: absolute; top: 6px; width: 12px; border-top: 1px solid #ddd; transform: rotate(45deg); } .close:after { content: ''; display: inline-block; position: absolute; top: 6px; width: 12px; border-top: 1px solid #ddd; transform: rotate(-45deg); }
箭头图标
- 右箭头
.arrow { display: inline-block; width: 8px; height: 8px; border-top: 1px solid #ddd; border-right: 1px solid #ddd; transform: rotate(45deg); }
- 左箭头
.arrow { display: inline-block; width: 8px; height: 8px; border-bottom: 1px solid #ddd; border-left: 1px solid #ddd; transform: rotate(45deg); }
- 下箭头
.arrow { display: inline-block; width: 8px; height: 8px; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; transform: rotate(45deg); }
- 上箭头
.arrow { display: inline-block; width: 8px; height: 8px; border-top: 1px solid #ddd; border-left: 1px solid #ddd; transform: rotate(45deg); }
三角形
- 下三角
.triangle { position: relative; display: inline-block; width: 8px; height: 8px; overflow: hidden; } .triangle:after { content: ''; position: absolute; top: 2px; display: inline-block; border-top: 4px solid #ddd; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 4px solid transparent; }
- 上三角
.triangle { position: relative; display: inline-block; width: 8px; height: 8px; overflow: hidden; } .triangle:after { content: ''; position: absolute; bottom: 2px; display: inline-block; border-top: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid #ddd; border-left: 4px solid transparent; }
- 右三角
.triangle { position: relative; display: inline-block; width: 8px; height: 8px; overflow: hidden; } .triangle:after { content: ''; position: absolute; left: 2px; display: inline-block; border-top: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 4px solid #ddd; }
- 左三角
.triangle { position: relative; display: inline-block; width: 8px; height: 8px; overflow: hidden; } .triangle:after { content: ''; position: absolute; right: 2px; display: inline-block; border-top: 4px solid transparent; border-right: 4px solid #ddd; border-bottom: 4px solid transparent; border-left: 4px solid transparent; }
相关推荐
沈宫新 2020-01-02
nicepainkiller 2020-01-04
LiybSunshine 2015-12-11
覆雪蓝枫 2019-06-27
afeichuanqi 2019-06-26
在明确了这些间隙产生的原因后,要去除这些间隙就变得容易多了,通常有以下集中办法去除这些间隙:。}优点:相比与设置负的margin-right大小的不确定性,设置font-size:0;显得更加好控制。
wangnantjobj 2019-06-25
csscode 2013-01-06
jianqi 2019-06-20
liusure0 2012-03-09
淡风wisdon大大 2011-06-10
每天积累一点点 2011-04-13
林一天 2010-09-16
MoeRookie 2010-09-14
Ladyseven 2010-09-14
MoeRookie 2010-09-03
tivon仔 2010-09-02