css
.icon { display: inline-block; width:20px; height:20px; background: url(delete.png) no-repeat center; white-space:nowrap; letter-spacing: -1em; text-indent: -99em; color: transparent; /* IE7 */ *text-indent: 0; *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '\3000');}.icon:before { content: '\3000'; }
html
情形1,空标签删除
情形2,内部有文字删除 后面的文字
--------下面是反例------
设置了overflow:hidden删除
效果图1 小字号
2 大字号
查看更多关于css笔记--小图标文字对齐中级解决方案_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did111575