为什么即使 Font-Awesome 的 css 完全相同,Material-icons 也不能设置垂直居中与文本对齐?(使用 Bootstrap3)
他们俩都有&:before { content: '{icontext}' }
<a class="btn btn-default">
<i class="material-icons"></i>
<i class="fa fa-bookmark"></i>
123
</a>
.material-icons {
display: inline-block;
font: normal normal normal 14px/1 'Material Icons';
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
编辑:
附上jsfiddle https://jsfiddle.net/laires/guxwxvzL/