{"id":2412,"date":"2017-05-02T17:01:27","date_gmt":"2017-05-02T17:01:27","guid":{"rendered":"http:\/\/cssreset.com\/?p=2412"},"modified":"2017-05-02T17:01:27","modified_gmt":"2017-05-02T17:01:27","slug":"how-to-use-csss-backface-visibility-property","status":"publish","type":"post","link":"https:\/\/cssdeck.com\/blog\/how-to-use-csss-backface-visibility-property\/","title":{"rendered":"How to Use CSS&#8217;s Backface-Visibility Property"},"content":{"rendered":"<p>CSS&#8217;s backface-visibility property is one that you might not have heard of before. The property is used to define the visibility of the back side of HTML elements that have been animated using CSS. If the element that you apply backface-visibility to isn&#8217;t animated, then there&#8217;s really no point in using the property at all.<\/p>\n<p>Using the backface-visibility property is fairly straightforward. It only takes a few values. Visible, which is the default value, makes the backface of the animated element visible during animations. If you want the backface of the animated element to be hidden from view, then you can use the hidden value. The other two values that the property takes are initial, which sets the property value to the default value, and inherit, which will inherit the value of the property from the value of its parent element.<\/p>\n<p>The syntax of the property is very simple. To see how it might look, check out the small snippet below:<\/p>\n<pre>.animated-object{\r\n\u00a0 \u00a0-webkit-backface-visibility: hidden;\r\n\u00a0 \u00a0backface-visibility: hidden;\r\n}<\/pre>\n<p>As you can see, we used the -webkit- vendor prefix along with the standard property name because the backface-visibility property isn&#8217;t universally supported on all browsers yet. In fact, the only browser it will work on without the use of a vendor prefix is Internet Explorer.<\/p>\n<p>To see this CSS property in action, check out <a href=\"http:\/\/thecodeplayer.com\/walkthrough\/pure-css-ufo-effect\" target=\"_blank\">this tutorial<\/a> from The Code Player, which is a perfect example of how to use the property in a fun context. The tutorial creates the effect of an unidentified flying object that&#8217;s orbiting a moon or a planetary object. The UFO circles all around the bigger object, and the author of tutorial applied the backface-visibility property to certain selectors that help make up the UFO to give it its flat, round look by hiding the backface of these particular selectors.<\/p>\n<p><a href=\"http:\/\/thecodeplayer.com\/walkthrough\/pure-css-ufo-effect\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2415 aligncenter\" alt=\"Screen Shot 2017-04-25 at 3.48.54 PM\" src=\"https:\/\/cssdeck.com\/blog\/\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-25-at-3.48.54-PM.png\" width=\"692\" height=\"680\" srcset=\"https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-25-at-3.48.54-PM.png 692w, https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-25-at-3.48.54-PM-300x294.png 300w, https:\/\/cssdeck.com\/blog\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-25-at-3.48.54-PM-180x176.png 180w\" sizes=\"(max-width: 692px) 100vw, 692px\" \/><\/a><\/p>\n<div class=\"wp-socializer wpsr-share-icons \" data-lg-action=\"show\" data-sm-action=\"show\" data-sm-width=\"768\" ><h3>Share and Enjoy !<\/h3><div class=\"wpsr-si-inner\"><div class=\"wpsr-counter wpsrc-sz-32px\" style=\"color:#000\"><span class=\"scount\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook,twitter,linkedin,pinterest,print,pdf\">0<\/span><\/span><small class=\"stext\">Shares<\/small><\/div><div class=\"socializer sr-popup sr-32px sr-circle sr-opacity sr-pad sr-count-1 sr-count-1\"><span class=\"sr-facebook\"><a rel=\"nofollow\" href=\"https:\/\/www.facebook.com\/share.php?u=\" target=\"_blank\"  title=\"Share this on Facebook\"  style=\"color: #ffffff\" ><i class=\"fab fa-facebook-f\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"facebook\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-twitter\"><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/intent\/tweet?text=%20-%20%20\" target=\"_blank\"  title=\"Tweet this !\"  style=\"color: #ffffff\" ><i class=\"fab fa-twitter\"><\/i><\/a><\/span>\n<span class=\"sr-linkedin\"><a rel=\"nofollow\" href=\"https:\/\/www.linkedin.com\/sharing\/share-offsite\/?url=\" target=\"_blank\"  title=\"Add this to LinkedIn\"  style=\"color: #ffffff\" ><i class=\"fab fa-linkedin-in\"><\/i><\/a><\/span>\n<span class=\"sr-pinterest\"><a rel=\"nofollow\" href=\"https:\/\/www.pinterest.com\/pin\/create\/button\/?url=&amp;media=&amp;description=\" target=\"_blank\"  title=\"Submit this to Pinterest\"  style=\"color: #ffffff\" data-pin-custom=\"true\"><i class=\"fab fa-pinterest\"><\/i><span class=\"ctext\"><span data-wpsrs=\"\" data-wpsrs-svcs=\"pinterest\">0<\/span><\/span><\/a><\/span>\n<span class=\"sr-print\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Print this article \"  style=\"color: #ffffff\" ><i class=\"fa fa-print\"><\/i><\/a><\/span>\n<span class=\"sr-pdf\"><a rel=\"nofollow\" href=\"https:\/\/www.printfriendly.com\/print?url=\" target=\"_blank\"  title=\"Convert to PDF\"  style=\"color: #ffffff\" ><i class=\"fa fa-file-pdf\"><\/i><\/a><\/span><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>CSS&#8217;s backface-visibility property is one that you might not have heard of before. The property is used to define the visibility of the back side of HTML elements that have been animated using CSS. If the element that you apply [&#8230;]<\/p>\n<p><a class=\"more-link article\" href=\"https:\/\/cssdeck.com\/blog\/how-to-use-csss-backface-visibility-property\/\" title=\"Click to read 'How to Use CSS&#8217;s Backface-Visibility Property'\">Read Article<\/a><\/p>\n","protected":false},"author":18,"featured_media":2415,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[61,6,36],"tags":[],"_links":{"self":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2412"}],"collection":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/comments?post=2412"}],"version-history":[{"count":2,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2412\/revisions"}],"predecessor-version":[{"id":2416,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/posts\/2412\/revisions\/2416"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media\/2415"}],"wp:attachment":[{"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/media?parent=2412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/categories?post=2412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cssdeck.com\/blog\/wp-json\/wp\/v2\/tags?post=2412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}