簡體   English   中英

當文檔使用javascript加載時,如何執行css3轉換?

[英]How can i execute a css3 transition when the document loads using javascript?

我只是想知道我是否可以在頁面加載時制作表單幻燈片

 <!DOCTYPE html>
 <html>
 <head>
 <link rel="stylesheet" href="css/gi.css">

 </head>
 <body onload='document.getElementById("form1").style["-webkit-transform"] = "translateX(100px);"'>
 <form action='gi.php' method='post' id='form1'>
 <!-- form elements -->
</form>
</body>
</html>

這就是我正在努力的代碼

注意:這個html將放在iframe中

任何回復將不勝感激

你可以嘗試這樣的事情

 form { transform: translateX(1000px); -webkit-animation: move 2s forwards; } @-webkit-keyframes move { 100% { transform: translateX(0) } } 
 <form action='gi.php' method='post' id='form1'> <input type="button" value="button"> <input type="button" value="button"> <input type="button" value="button"> <input type="button" value="button"> <input type="button" value="button"> <input type="button" value="button"> </form> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM