使用 CSS 建立停用外觀按鈕
若要建立停用按鈕外觀,請使用 CSS 不透明度屬性。
示例
您可以嘗試執行以下程式碼,以建立停用按鈕外觀 −
<!DOCTYPE html>
<html>
<head>
<style>
.btn1 {
color: black;
text-align: center;
font-size: 15px;
}
.btn2 {
color: black;
text-align: center;
font-size: 15px;
opacity: 0.5;
}
</style>
</head>
<body>
<h2>Result</h2>
<p>Click below for result:</p>
<button class = "btn1">Enabled</button>
<button class = "btn2">Disabled</button>
</body>
</html>
廣告
資料結構
網路
RDBMS
作業系統
Java
iOS
HTML
CSS
Android
Python
C 程式設計
C++
C#
MongoDB
MySQL
JavaScript
PHP