CSS関数を動的にする方法はありますか?CSSのアニメーション幅を変更することは可能ですか?
.test2
{
width:200px;
height: 90%;
-webkit-animation:myfirst2 linear; /* Safari and Chrome */
-webkit-animation-duration: 10s;
}
@-webkit-keyframes myfirst2 /* Safari and Chrome */
{
from { height: 0%; } <--this must be dynamic
to { height: 90%; } <--this must be dynamic
}
私はJavaScriptを使用してfrom { height: 0%; }
とto { height: 90%; }
がダイナミックたいです。
これは可能ですか?あなたはイースリーの.cssに与えることができます
あなたがこれを行うことができところで – tkone
これはあなたが望むものになりそうだ。http://stackoverflow.com/questions/2495829/dynamically-modify-webkit-animation-with-javascript – callumacrae
はい、おかげでカラム・マクレイ。これは私が探していた解決策でした。 – robind38