JSFiddle - React, Tailwind, and code Playground
by wenyi
HTML
<a href="#" class="btn" disabled="disabled">按钮</a>
CSS
.btn.disabled,
.btn[disabled] {
cursor: default;
background-color: #e6e6e6;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.btn.disabled,
.btn[disabled] {
pointer-events: none;
cursor: default;
}
JavaScript
$(function() {
$('.btn').click(function() {
alert('click');
});
});