執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> #myDIV { height: 50px; margin: 10px 0; border: solid black 1px; background-color: lightblue; inline-size: 100px; } </style> </head> <body> <h1>Change inline-size property with JavaScript</h1> <p>Click the "Try it" button to change the inline-size values of the DIV element:</p> <button onclick="myFunction()">Try it</button> <div id="myDIV"> This is my DIV element. </div> <script> function myFunction() { document.getElementById("myDIV").style.inlineSize = "250px"; } </script> </body> </html>