JSFiddle - React, Tailwind, and code Playground
HTML
<div id="invisible">
</div>
<input type="button" value="test" id="testBtn" />
CSS
#invisible {
width: 100px;
height: 100px;
background-color: rgba(0, 0, 0, 0);
position: absolute;
top: 20px;
left: 20px;
}
JavaScript
function test() {
if ($("#invisible").css("background-color") !== 'transparent') {
alert($("#invisible").css("background-color")); // IE11: "transparent" Any other browser: rgba(0, 0, 0, 0) or rgb(0,0,0,0)
}
}
$("#testBtn").on("click", test());