Chrome에서 멋지게 보이는 CSS에 멋진 "pop"
호버 효과를 사용하고 있습니다.IE에서 CSS 애니메이션 효과 사용 안 함
그러나 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