1
這個簡單的動畫適用於FireFox,但不適用於Chrome。此動畫適用於FireFox,但不適用於Chrome。代碼中出現了什麼問題?
我認爲他遵循了所有的規則,但有些東西逃脫了我。
你認爲在Chrome的代碼中有什麼錯誤?
感謝
<?xml version='1.0' encoding='UTF-8'?>
<svg version='1.1' id='project' xmlns:svg='http://www.w3.org/2000/svg'
xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink'>
<style type="text/css">
@keyframes gray {
from { filter: grayscale(0); -webkit-filter: grayscale(0);}
to { filter: grayscale(1); -webkit-filter: grayscale(1);}
}
.box {
animation: gray 3s infinite linear;
-webkit-animation: gray 3s infinite linear;
}
</style>
<g>
<rect id="rectanguloDeFondo1" class="box" fill="green" width="120" height="245"/>
</g>
</svg>
這是一個解決方法和它的工作,我個人會使用SVG濾鏡 –