Я использую эффект зависания "pop"
в CSS, который отлично смотрится в Chrome.Отключить эффект анимации CSS в IE
Однако в Internet Explorer 11 (и ниже) область окна гаснет при наведении курсора, а затем в черный цвет.
Есть ли способ отключить это в IE или, по крайней мере, исправить сбой, где он исчезнет ненадолго?
Демо:http://jsfiddle.net/0hLLkyh3/
@import url(http://fonts.googleapis.com/css?family=Roboto);
h2 {
font-size: 18px;
margin-bottom: 20px;
line-height: 28px;
margin-top: 0;
font-weight: 900;
}
.effects {} body {
margin: 0 auto;
max-width: 800px;
padding: 40px 20px 20px 20px;
font-family: sans-serif;
color: #333;
line-height: 140%;
}
img {
border: none;
}
small {
display: block;
}
p,
[class^="hvr-"] {
font-family: 'Roboto', sans-serif;
}
[class^="hvr-"] {
/*display: inline-block;*/
/*vertical-align: middle;*/
margin: .4em;
padding: 1em;
cursor: pointer;
background: #e1e1e1;
text-decoration: none;
color: #666;
/* Prevent highlight colour when element is tapped */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.aligncenter {
text-align: center;
}
a {
color: #2098D1;
text-decoration: none;
}
.mt-30 {
margin-top: 30px;
}
a:hover {
background: black
}
/*!
* Hover.css (http://ianlunn.github.io/Hover/)
* Version: 2.0.2
* Author: Ian Lunn @IanLunn
* Author URL: http://ianlunn.co.uk/
* Github: https://github.com/IanLunn/Hover
* Made available under a MIT License:
* http://www.opensource.org/licenses/mit-license.php
* Hover.css Copyright Ian Lunn 2014. Generated with Sass.
*/
/* 2D TRANSITIONS */
/* Pop */
@-webkit-keyframes web-hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}
@keyframes hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}
.hvr-pop {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
}
.hvr-pop:hover,
.hvr-pop:focus,
.hvr-pop:active {
-webkit-animation-name: web-hvr-pop;
animation-name: hvr-pop;
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
}
<div class="effects">
<a class="hvr-pop" href="#">Pop</a>
</div>
Протестировано на IE11 и работает как ожидалось: никакого «сбоя» не видно. –
@ ADreNaLiNe-DJ Weeeird. Не первый, кто это упоминает. Я включил/отключил просмотр совместимости и по-прежнему получал тот же «зависание, он заканчивается, а затем черный». – michaelmcgurk