<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
color: white;
animation: mymove 2s infinite linear alternate;
}
@keyframes mymove {
to {transform: rotateY(180deg);}
}
</style>
</head>
<body>
<h1>Change backface-visibility with JavaScript</h1>
<p>Check/uncheck the checkbox to change the backface-visibility of the animated DIV element:</p>
<div id="myDIV"><h1>Hello</h1></div>
<input type="checkbox" onclick="myFunction(this)" checked>backface-visibility
<script>
function myFunction(x) {
if (x.checked === true) {
document.getElementById("myDIV").style.backfaceVisibility = "visible";
} else {
document.getElementById("myDIV").style.backfaceVisibility = "hidden";
}
}
</script>
<p><strong>Note:</strong> The backface-visibility and backfaceVisibility properties are not supported in Internet Explorer 9 and earlier versions.</p>
</body>
<!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss3_js_backface-visibility by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:00:11 GMT -->
</html>