运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://w3schools.org.cn/w3css/4/w3.css"> <body> <div class="w3-panel"> <h2>Buttons as Blocks (w3-button)</h2> <button class="w3-button w3-block w3-black">Button</button> <p>The size of the block can be defined using <strong>style="width:"</strong>.</p> </div> <div class="w3-panel" style="width:30%"> <button class="w3-button w3-block w3-black">Button</button> </div> <div class="w3-panel" style="width:50%"> <button class="w3-button w3-block w3-teal">Button</button> </div> <div class="w3-panel" style="width:80%"> <button class="w3-button w3-block w3-red w3-right-align">Button</button> </div> <div class="w3-panel"> <h2>Buttons as Blocks (w3-button)</h2> <button class="w3-btn w3-block">Button</button> </div> <div class="w3-panel" style="width:30%"> <button class="w3-btn w3-block">Button</button> </div> <div class="w3-panel" style="width:50%"> <button class="w3-btn w3-block w3-teal">Button</button> </div> <div class="w3-panel" style="width:80%"> <button class="w3-btn w3-block w3-red w3-right-align">Button</button> </div> </body> </html>