* { box-sizing: border-box; } html { margin: 0; padding: 0; overflow: hidden; font-size: 16pt; } h1 { font-size: 2.4rem; } .fragment { opacity: 0; transition: .3s opacity ease-in-out; } .fragment.visible { opacity: 1; } @media screen { body { background: black; margin: 0; padding: 0; } section { display: contents; } article { display: none; align-items: center; justify-content: center; flex-direction: column; background: white; position: absolute; width: 100vw; height: 100vh; } article:target { display: flex; } }