JSFiddle - React, Tailwind, and code Playground
by tr_santi
HTML
<div>
CLICK ME
</div>
CSS
div {
padding: 100px;
background-color: red;
color: white;
opacity: 0.4;
}
* {
transition: all .5s ease-in-out, opacity 2s linear, background 4s ease-out;
}
.change {
font-size: 20px;
opacity: 1;
background-color: blue;
}
JavaScript
$("div").on("click", function() {
$(this).addClass("change");
})