$cloud_width: 200px; @import 'fonts'; body { margin: 0; padding: 0; @include body-font; .clouds { position: absolute; width: $cloud_width; animation-name: move_right; animation-direction: alternate; animation-iteration-count: infinite; animation-timing-function: linear; } #cloud1 { top: $cloud_width / 466 * 70; // 1 cloud worth of gap left: 0; animation-duration: 17s; } #cloud2 { top: $cloud_width / 466 * 70 * 4; // 4 clouds worth of gap left: 0; animation-delay: -2s; animation-duration: 15s; transform: rotateY(180deg); } .top { background-image: linear-gradient(#24d3ff, #aaeeff); min-height: 70vh; display: flex; align-items: end; .wrapper { height: 100%; align-items: flex-end; padding-bottom: 3em; } } .bottom { background-image: linear-gradient(#26a4c4, #afdde9); min-height: 30vh; .wrapper { align-items: flex-start; padding-top: 3em; .content { display: flex; width: 100%; justify-content: space-evenly; .button { font-size: 1.5em; color: #000; padding: 1em; border-color: #000; border-width: 3px; border-style: solid; border-radius: 1.5em; text-decoration: none; } .button:hover, .button:active { background-color: #000; color: #FFF; } } } } .wrapper { position: relative; width: 100vw; box-sizing: border-box; z-index: 100; display: flex; justify-content: center; .content { box-sizing: border-box; max-width: 800px; width: 80%; } } } h1 { @include title-font; font-size: 4em; text-align: center; } @keyframes move_right { from {left: 0} to {left: calc(100vw - #{$cloud_width})} } @keyframes move_left { from {right: 0} to {right: calc(100vw - #{$cloud_width})} }