代码示例:(标识:css_buttons_disabled)
<!DOCTYPE html>
<html>
<head>
<style>
.button {
  background-color: #4CAF50; /* 绿色 */
  border: none;
  color: white;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  cursor: pointer;
}

.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
</style>
</head>
<body>

<h1>被禁用的按钮</h1>

<p>使用 opacity 属性向按钮添加一定的透明度(使它看上去已被禁用)</p>

<button class="button">正常按钮</button>
<button class="button disabled">被禁用的按钮</button>

</body>
</html>
运行结果: