執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { width: 100px; height: 100px; background: red; color: white; animation: mymove 2s infinite linear alternate; } @keyframes mymove { to {transform: rotateY(180deg);} } </style> </head> <body> <h1>HTML Style Object</h1> <h2>The backfaceVisibility Property</h2> <p>Check/uncheck the checkbox to change the backface-visibility of the animated DIV element:</p> <div id="myDIV"> <h1>Hello</h1> </div> <input type="checkbox" onclick="myFunction(this)" checked>backface-visibility <script> function myFunction(x) { if (x.checked === true) { document.getElementById("myDIV").style.backfaceVisibility = "visible"; } else { document.getElementById("myDIV").style.backfaceVisibility = "hidden"; } } </script> </body> </html>