-1
我希望主頁上的圖像效果在鼠標懸停以及鼠標懸停時淡出。CSS:緩解不工作的轉換
我已將 all 1s ease;
all 1s ease;
更改爲:全部1s ease-in-out;
但在鼠標懸停時它仍然不會消失,但它只是跳躍。
網站:http://wolf-photoart.witconsult.de/
這是我目前的CSS的例子:
#mainportraits img, #mainart img, #maincomics img { max-width: 56vw; }
#mainportraits img:hover, #mainart img:hover, #maincomics img:hover{
-webkit-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8);
-moz-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8);
-o-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8);
-ms-filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8);
filter: grayscale(50%) contrast(1.2) blur(3px) brightness(0.8);
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
#mainportraits:after{
content: 'Portraits';
z-index: 9999;
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
}
#mainportraits:hover:after{
-webkit-opacity: 0.25;
-moz-opacity: 0.25;
opacity: 0.25;
-webkit-transition: all 1s ease-in-out;
-moz-transition: all 1s ease-in-out;
-ms-transition: all 1s ease-in-out;
-o-transition: all 1s ease-in-out;
transition: all 1s ease-in-out;
}
我在做什麼錯?謝謝!
尋求代碼幫助的問題必須包括在問題本身**中重現**所需的最短代碼。儘管您已經提供了一個示例鏈接,但如果鏈接無效,那麼您的問題對於其他未來具有相同問題的SO用戶將沒有任何價值。 –