this transition的基本思想是當鼠標懸停時增加字體真棒圖標和文本的大小。CSS轉換(僞元素,字體大小,EM,IE)不起作用
它工作正常鉻,歌劇,Safari和Firefox,但它不與IE 11
的例子工作表明使用PX(類TEST1)和EM(類測試2)相同的過渡;我用px沒有問題;問題是特定於以下情形:
效果:過渡
類型:僞元素
物業:字體大小
單位:EM
瀏覽器:IE 11
.test1 span{
font-size: 40px;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test1::before{
font-family: FontAwesome;
font-size: 20px;
content: "\f08e";
position: relative;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test1:hover span{
font-size: 80px;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test1:hover::before{
font-size: 40px;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test2 span{
font-size: 1em;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test2::before{
font-family: FontAwesome;
font-size: 0.5em;
content: "\f08e";
position: relative;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test2:hover span{
font-size: 2em;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.test2:hover::before{
font-size: 1em;
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
<html>
<head>
<link rel="stylesheet" href="https://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css">
</head>
<body>
<table>
<tr style="font-size: 40px;">
<td class="test1">
<span>Text 01</span>
</td>
</tr>
<tr style="font-size: 40px;">
<td class="test2">
<span>Text 01</span>
</td>
</tr>
</table>
</body>
</html>
我失去了一些東西在這裏? IE中有沒有已知的問題?
我能找到的最類似的問題是this one,它提到了IE中的一個已知問題,但它似乎是一個不同的問題。