
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Set whether or not an element should be visible while not facing the screen with JavaScript?
Use the JavaScript backfaceVisibility property to set whether or not an element should be visible while not facing the screen.
Example
You can try to run the following code to learn how to implement a backfaceVisibility property in JavaScript −
<!DOCTYPE html> <html> <head> <style> div { width: 200px; height: 300px; background: blue; color: black; animation: mymove 2s infinite linear alternate; } @keyframes mymove { to {transform: rotateY(180deg);} } </style> </head> <body> <p>Check below to display backface</p> <div id="box"> <h1>Demo</h1> </div> <input type="checkbox" onclick="display(this)" checked>backfaceVisibility Property <script> function display(x) { if (x.checked === true) { document.getElementById("box").style.backfaceVisibility = "visible"; } else { document.getElementById("box").style.backfaceVisibility = "hidden"; } } </script> </body> </html>
- Related Articles
- Determine whether an element should be visible when not facing the screen with CSS
- How to set whether an element should be visible in JavaScript?
- Set whether the flexible items should wrap or not with JavaScript?
- How to set whether the text of an element can be selected or not with JavaScript?
- Set whether the table border should be collapsed into a single border or not with JavaScript?
- How to set whether or not an element is resizable by the user with JavaScript?
- Set whether the text of the element can be selected or not with CSS
- How to specify whether the content of an element should be translated or not in HTML?
- How to set whether an element is draggable or not in HTML?
- Specify whether the flex items should wrap or not with CSS
- How to set or return the number of columns an element should be divided into with JavaScript?
- How to set whether the image-border should be repeated, rounded or stretched with JavaScript?
- Verifying whether an element present or visible in Selenium Webdriver
- Set whether an animation should be played forwards or using CSS
- JavaScript Check whether string1 ends with strings2 or not

Advertisements