2017-12-18 3 views
0

내가 때문에 -webkit의 호환성 문제의 투명 색상을 설정 캔트애니메이션 -webkit-텍스트 채우기 색

a { 
    color: #fff; 
    -webkit-text-fill-color: rgba(255,255,255,0); 
    -webkit-text-stroke-width: 2px; 
    -webkit-text-stroke-color: #fff; 
    -webkit-text-stroke: 2px white; 
    -webkit-transition: all .5s ease-out; 
    -moz-transition: all .5s ease-out; 
    -o-transition: all .5s ease-out; 
    transition: all .5s ease-out; 
    } 
a:hover { 
    -webkit-text-fill-color: rgba(255,255,255,1); 
} 

-webkit-텍스트 채우기 색을 사용하여 텍스트의 투명도를 애니메이션 시도 IE에서 -ext-fill-color 및 -webkit-text-stroke.

+0

을 시도하십시오 예를 들어 'fallback'에 대한 'color' –

+0

텍스트 그림자를 사용하지 않는 주 배경은 이미지입니다. –

+0

더 간단한 해결책은 ie와 edge 14를 감지하고 이러한 요소의 색상 스타일을 덮어 쓰는 것입니다. 어떻게 생각합니까? –

답변

0

내 Mac에서 그것을 테스트하기 위해 IE 브라우저가없는 죄송합니다,이 코드

당신의 배경은`텍스트 shadow`를 사용할 수있는 고체 반이면

a { 
 
    
 
    color: #d5d5d5; 
 
    -webkit-text-fill-color: rgba(225,255,255,0); 
 
    -webkit-text-stroke-width: 2px; 
 
    -webkit-text-stroke-color: #d5d5d5; 
 
    -webkit-text-stroke: 2px #d5d5d5; 
 
    -webkit-transition: all .5s ease-out; 
 
-moz-transition: all .5s ease-out; /*gecko*/ 
 
-ms-transition: all .5s ease-out; /*IE10*/ 
 
-o-transition: all .5s ease-out; /*opera 11.10+*/ 
 
-pie-transition: all .5s ease-out; /*PIE*/ 
 
    transition: all .5s ease-out; 
 
    } 
 
a:hover { 
 
    color: #000; 
 
    -webkit-text-fill-color: rgba(255,255,255,1); 
 
    -webkit-text-stroke-width: 2px; 
 
    -webkit-text-stroke-color: #000; 
 
-moz-transition: all .5s ease-out; /*gecko*/ 
 
-ms-transition: all .5s ease-out; /*IE10*/ 
 
-o-transition: all .5s ease-out; /*opera 11.10+*/ 
 
-pie-transition: all .5s ease-out; /*PIE*/ 
 
    transition: all .5s ease-out; 
 
}
<a href="#">Test</a>

+0

이것은 첫 번째 접근 방식으로 IE에서는 잘 작동하지만 Edge -v14에서는 작동하지 않습니다. -webkit-text-stroke-color는 예상 한대로 색상을 덮어 쓰지만 -webkit-text-stroke는 v15까지 텍스트가 표시 될 때까지 소개되지 않았습니다. 감사합니다 –

+0

그냥. 하지마. 기계적으로 어떤 조합이 우연히 작동하기를 바라는 모든 알려진 접두어를 시도하십시오. 벤더 프리픽스가 더 이상 벤더가 아닌 2012 년 이후로 웹은 이와 같이 작동하지 않습니다. 어떤 브라우저는 요즘에는 무엇이든'-o-'가 필요하고 폼 컨트롤을 조정하는 것 이외에는'-moz-'가 필요하지 않습니다. 대신 자동 프리 픽서를 사용하십시오. –