--- title: Fullscreen tags: visual expertise: advanced cover: blog_images/flower-portrait-3.jpg firstSeen: 2019-01-12T13:08:40+02:00 lastUpdated: 2021-10-13T19:29:39+02:00 --- Applies styles to an element when in fullscreen mode. - Use the `:fullscreen` CSS pseudo-element selector to select and style an element that is displayed in fullscreen mode. - Use a ` ``` ```css .container { margin: 40px auto; max-width: 700px; } .element { padding: 20px; height: 300px; width: 100%; background-color: skyblue; box-sizing: border-box; } .element p { text-align: center; color: white; font-size: 3em; } .element:-ms-fullscreen p { visibility: visible; } .element:fullscreen { background-color: #e4708a; width: 100vw; height: 100vh; } ```