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.w3-container"> <p>Các lớp w3-opacity thêm độ mờ/độ trong suốt cho một phần tử (độ mờ : 0.6), trong khi w3-opacity-off tắt độ trong suốt (độ mờ: 1).</p> <button onclick="myFunction()" class="w3-button w3-black">Chuyển đổi độ mờ (bật và off)</button> <p id="Demo" class="w3-opacity w3-red">Đoạn demo.</p> </div> <script> function myFunction() { var x = document.getElementById( "Thử nghiệm"); if (x.className.indexOf("w3-opacity-off") == -1) { x.className += " w3-opacity-off"; } else { x.className = x.className.replace(" w3-opacity-off", ""); } } </script> </body> </html>