停用 Bootstrap 列表組中的列表項
在 Bootstrap 列表組中使用 .disabled 類可停用列表中的一個列表項。
可嘗試執行以下程式碼停用一個列表項:
示例
<!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"></script> <script src = "/bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class = "container"> <h2>Beverages</h2> <div class = "list-group"> <a href = "#" class = "list-group-item">Gatorade</a> <a href = "#" class = "list-group-item">Coca Cola</a> <a href = "#" class = "list-group-item">Pepsi</a> <a href = "#" class =" list-group-item disabled">Sting</a> </div> </div> </body> </html>
廣告
資料結構
網路
關係型資料庫管理系統
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
Javascript
PHP