JSFiddle - React, Tailwind, and code Playground
by urashita
HTML
マウスオーバーで赤色
<br>
<body>
<div id="button" href="#" ontouchstart="">ボタン </div>
</body>
CSS
#button {
display: inline-block;
padding: 5px 10px;
background-color: green;
color: white;
border: 1px solid;
text-decoration: none;
font-size: 20px;
}
#button:hover {
background-color: red;
}
#button:active {
background-color: blue;
}
#button::before {
content: none;
}
#button:after {
content: none;
}
JavaScript
$('#button').on('click',function() {
window.alert('aaa');
$('#button').disabled();
});