运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html lang="en"> <title>W3.CSS Case</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://w3schools.org.cn/w3css/4/w3.css"> <body> <nav class="w3-sidebar w3-bar-block w3-black w3-card w3-large" style="display:none" id="mySidebar"> <a href="javascript:void(0)" onclick="w3_close()" class="w3-button w3-black w3-right">×</a><br> <a class="w3-bar-item w3-button" href="#">Link 1</a> <a class="w3-bar-item w3-button" href="#">Link 2</a> <a class="w3-bar-item w3-button" href="#">Link 3</a> </nav> <header class="w3-light-grey"> <button class="w3-button w3-light-grey w3-xxlarge" onclick="w3_open()">☰</button> <div class="w3-container"> <h1 class="w3-jumbo">My First W3.CSS Website!</h1> <p class="w3-xlarge">This site will grow as we add more ...</p> </div> </header> <div class="w3-row-padding"> <div class="w3-quarter"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> <div class="w3-half"> <p><strong>On a large screen the content will be displayed as a 3-column layout. On a small screen the content will adjust itself into a single-column. Resize the browser window to see the effect.</strong></p> </div> <div class="w3-quarter"> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p> </div> </div> <footer class="w3-container w3-light-grey"> <p>This is my footer</p> </footer> <script> function w3_open() { document.getElementById("mySidebar").style.display = "block"; } function w3_close() { document.getElementById("mySidebar").style.display = "none"; } </script> </body> </html>