Mozilla Firefox에서 작동하며 Google 크롬에서는 작동하지 않는 CSS 코드가 있습니다. 모질라 글꼴 색상 전환에서 Chrome에서 CSS 전환이 작동하지 않습니다.
.lightBtn {
width: 500px;
height: 49px;
color: #000000;
background: white;
transition-duration: 0.4s;
-webkit-transition-duration: 0.4s;
display: inline-block;
-webkit-transition: all 0.25s;
transition: all 0.25s;
}
.lightBtn:hover {
background: black;
color: white;
}
.lightBtn span {
display: inline-block;
position: relative;
-webkit-transition: 0.25s;
transition: 0.25s;
}
.lightBtn span:after {
content: '>>';
position: absolute;
opacity: 0;
top: 0;
right: -20px;
-webkit-transition: 0.25s;
transition: 0.25s;
}
.lightBtn:hover span {
padding-right: 25px;
}
.lightBtn:hover span:after {
opacity: 1;
right: 0;
}
<button class="lightBtn" ><span>Special effect</span></button>
<p>Hover over the div element above, to see the transition effect.</p>
기본 전환을 확인하고 잘 작동하지만 호버에 애니메이션을 추가하는 동안 색상 자체의 전환이 작동하지 않습니다. This is animation I'm trying achieve. 원래는 글꼴 색상이 전환되지 않았습니다. 색상 전환과 애니메이션 모두 별도로 작동하지만, 결합하면 글꼴 색상 전환이 작동하지 않습니다 (Google 크롬에서). Mozilla에서 내가 성취하려고하는 것을 확인할 수 있습니다.
축하합니다, 당신이 게시물 : –
그것을 위해 어떤 배지는 거기에 버그를 발견 보인다? :) –