当前位置: 动力学知识库 > 问答 > 编程问答 >

html - "::before" disappearing when resizing browser window

问题描述:

I have the following line of code:

<a href="##" class="navbar-toggle pull-left js-tray-toggle"><span class="icon-menu"></span></a>

.icon-menu:before {

content: "\e001";

}

*, *:before, *:after {

-webkit-box-sizing: border-box;

-moz-box-sizing: border-box;

box-sizing: border-box;

}

when I resize the browser to a tablet dimension (tested as well on real devices) the "::before" disappears inside the span element making the icon not displaying on tablets.

The font-icon generated disappears when you are in tablets but it's fine on mobiles. When inspected the ":before" disappears when the window is resized at an average tablet dimension and then it appears again in a mobile dimension.

分享给朋友:
您可能感兴趣的文章:
随机阅读: