Ser Archer (Talk | contribs) |
Ser Archer (Talk | contribs) |
||
Line 40: | Line 40: | ||
} | } | ||
− | @keyframes | + | @keyframes mymovewheel { |
from {} | from {} | ||
to { | to { | ||
Line 47: | Line 47: | ||
} | } | ||
− | @-moz-keyframes | + | @-moz-keyframes mymovewheel { |
from {} | from {} | ||
to { | to { | ||
Line 54: | Line 54: | ||
} | } | ||
− | @-webkit-keyframes | + | @-webkit-keyframes mymovewheel { |
from {} | from {} | ||
to { | to { | ||
Line 61: | Line 61: | ||
} | } | ||
− | @-o-keyframes | + | @-o-keyframes mymovewheel { |
from {} | from {} | ||
to { | to { | ||
Line 71: | Line 71: | ||
{ | { | ||
position: absolute; | position: absolute; | ||
− | top: | + | top: 1150px; |
width: 10%; | width: 10%; | ||
− | height: | + | height: 1000px; |
− | left: | + | left:21%; |
− | + | ||
− | + | ||
− | + | ||
background: url(https://static.igem.org/mediawiki/2018/0/0a/T--CPU_CHINA--background-wheel.png); | background: url(https://static.igem.org/mediawiki/2018/0/0a/T--CPU_CHINA--background-wheel.png); | ||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||
Line 86: | Line 83: | ||
position: absolute; | position: absolute; | ||
top: 145px; | top: 145px; | ||
− | width: | + | width:60%; |
+ | height:1000px; | ||
margin-left:10%; | margin-left:10%; | ||
background: url(https://static.igem.org/mediawiki/2018/4/41/T--CPU_CHINA--background-carriage.png); | background: url(https://static.igem.org/mediawiki/2018/4/41/T--CPU_CHINA--background-carriage.png); | ||
background-repeat: no-repeat; | background-repeat: no-repeat; | ||
background-size: 100%; | background-size: 100%; | ||
+ | } | ||
+ | .whole-carriage{ | ||
+ | position:relative; | ||
+ | animation:mymove 5s; | ||
+ | -webkit-animation:mymove 5s; /*Safari and Chrome*/ | ||
+ | } | ||
+ | |||
+ | @keyframes mymove | ||
+ | { | ||
+ | from {left:0px;} | ||
+ | to {left:100%;} | ||
+ | } | ||
+ | |||
+ | @-webkit-keyframes mymove /*Safari and Chrome*/ | ||
+ | { | ||
+ | from {left:0px;} | ||
+ | to {left:100%;} | ||
} | } | ||
</style> | </style> | ||
Line 110: | Line 125: | ||
Your browser does not support the video tag. | Your browser does not support the video tag. | ||
</video> | </video> | ||
+ | <div id="whole-carriage" class="whole-carriage"> | ||
+ | <div class="carriage" id="carriage"> | ||
+ | </div> | ||
− | <div class=" | + | <div class="wheel" id="wheel1"> |
− | </div> | + | </div> |
− | <div class="wheel" id=" | + | <div class="wheel" id="wheel2" style="margin-left:26%"> |
+ | </div> | ||
</div> | </div> | ||
− | |||
− | |||
− | |||
− | |||
</body> | </body> | ||
Line 139: | Line 154: | ||
} | } | ||
+ | $(document).ready(function(){ | ||
+ | $(".whole-carriage").css("animation","mymove 5s"); | ||
+ | $(".whole-carriage").css("-webkit-animation","mymove 5s"); | ||
+ | |||
+ | var e = document.getElementById("whole-carriage"); | ||
+ | e.addEventListener("animationend", function() { | ||
+ | alert('css3运动结束!'); | ||
+ | }); | ||
+ | }) | ||
+ | |||
+ | |||
+ | |||
+ | var e = document.getElementById("whole-carriage"); | ||
+ | e.addEventListener("animationend", function() { | ||
+ | alert('css3运动结束!'); | ||
+ | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 09:13, 17 October 2018