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