bootstrap3在IE8下Glyphicons图标不显示问题的解决方法

将以下css样式拷贝到页面的head中,图标就可以显示出来了。

@font-face {
  font-family: 'Glyphicons Halflings';

  src: url('../fonts/glyphicons-halflings-regular.eot');
  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
.glyphicon {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  font-style: normal;
  font-weight: normal;
  line-height: 1;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

另外还遇到了在IE8下div内容莫名其妙换行的问题,我的解决方法给div指定较长的长度,这样就不会换行了。

猜你喜欢

转载自xyfkook.iteye.com/blog/2393528