Chạy ❯
Nhận trang web của
riêng
bạn
×
Thay đổi định hướng
Lưu mã
Thay đổi chủ đề, Tối/Sáng
Đi tới Không gian
<!DOCTYPE html> <html> <title>W3.CSS</title> <meta name="viewport" content="width=device-width,init-scale=1"> <link rel="stylesheet" href= "https://www.example.com.vn/w3css/4/w3.css"> <body> <div class="w3-bar w3-red"> <a href="#" class="w3-bar- item w3-button">Trang chủ</a> <a href="#" class="w3-bar-item w3-button w3-hide-small">Liên kết 1</a> <a href="#" lớp ="w3-bar-item w3-button w3-hide-small">Liên kết 2</a> <a href="#" class="w3-bar-item w3-button w3-hide-small">Liên kết 3 </a> <a href="javascript:void(0)" class="w3-bar-item w3-button w3-right w3-hide-large w3-hide-medium" onclick="myFunction()">& #9776;</a> </div> <div id="demo" class="w3-bar-block w3-red w3-hide w3-hide-large w3-hide-medium"> <a href="# " class="w3-bar-item w3-button">Liên kết 1</a> <a href="#" class="w3-bar-item w3-button">Liên kết 2</a> <a href= "#" class="w3-bar-item w3-button">Liên kết 3</a> </div> <div class="w3-container"> <p>Trong ví dụ, thanh điều hướng được thay thế bằng một nút (☰) ở góc trên bên phải khi hiển thị trên máy tính bảng và thiết bị di động. Khi nhấn nút, các liên kết trong thanh sẽ xếp chồng lên nhau theo chiều dọc.</p> <p>Thay đổi kích thước màn hình để xem hiệu ứng.</p> </div> <script> function myFunction() { var x = document .getElementById("demo"); if (x.className.indexOf("w3-show") == -1) { x.className += " w3-show"; } else { x.className = x.className.replace(" w3-show", ""); } } </script> </body> </html>