iPhone-X

HTML
<div class="iphone-x"> <div class="left-side"> <div class="silencer"></div> <div class="volume up"></div> <div class="volume down"></div> </div> <div class="lock"></div> <div class="stupid-notch"> <div class="camera-1"></div> <div class="speaker"></div> <div class="camera-2"></div> </div> <div class="status-bar"> <div class="network"><i class="fas fa-signal"></i>G5</div> <div class="wifi"><i class="fas fa-wifi"></i></div> <div class="battery"><i class="fas fa-battery-quarter"></i></div> </div> <div class="time">8:32</div> <div class="date">April 15</div> <div class="flashlight"><i class="fas fa-bolt"></i></div> <div class="camera"><i class="fas fa-camera"></i></div> <div class="bottom-bar"></div> </div>
CSS
* { margin: 0; padding: 0; font: inherit; box-sizing: border-box; } html { font-family: 'Roboto'; font-size: 1rem; font-weight: 100; height: 100%; } body { display: flex; height: 100%; } .iphone-x { margin: auto; height: 734px; width: 360px; background-color: black; border: 3px solid #666; border-radius: 50px; box-shadow: 0 0 60px rgba(0, 0, 0, 0.3); transform: scale(0.975); z-index: 0; } .iphone-x .awesome { position: fixed; content: ''; display: flex; align-items: center; justify-content: center; top: -20%; left: 36%; width: 100%; height: 100%; opacity: 0; transition: 0.25s; z-index: 9999; } .iphone-x .stupid:before, .iphone-x .stupid:after { position: absolute; content: ''; top: 0; left: 0; width: 100px; height: 1000px; background-color: #e74c3c; border-radius: 99px; } .iphone-x .stupid:before { transform: rotate(-45deg); } .iphone-x .stupid:after { transform: rotate(45deg); } .iphone-x .stupid h1 { position: absolute; top: 50%; left: 50%; width: 100%; color: white; font-family: 'Source Sans Pro', sans-serif; font-size: 50px; font-weight: 700; text-align: center; text-shadow: 0 0 30px rgba(0, 0, 0, 0.7); transform: translate(-85%, 100%); z-index: 99999; } .iphone-x:before { position: absolute; content: ''; top: 50%; left: 50%; width: 97%; height: 98.5%; background-image: url("http://state38.co/codepen/mountains.jpg"); background-position: center; background-repeat: no-repeat; background-size: cover; border-radius: 45px; transform: translate(-50%, -50%); } .iphone-x .left-side { position: absolute; top: 95px; left: -5px; width: 5px; height: 172px; z-index: -9; } .iphone-x .left-side .silencer { position: absolute; top: 1px; left: 0; width: 2px; height: 30px; background-color: #666; border-radius: 99px; } .iphone-x .left-side .volume { position: absolute; width: 2px; height: 50px; background-color: #666; border-radius: 99px; } .iphone-x .left-side .volume.up { top: 55px; left: 0; } .iphone-x .left-side .volume.down { top: 120px; left: 0; } .iphone-x .lock { position: absolute; top: 165px; right: -4px; width: 3px; height: 75px; background-color: #666; border-radius: 99px; z-index: -9999; } .iphone-x .stupid-notch { position: absolute; top: 0; left: 50%; width: 50%; height: 35px; background-color: black; border-radius: 0 0 20px 20px; transform: translateX(-50%); } .iphone-x .stupid-notch .camera-2 { position: absolute; top: 50%; right: 30px; width: 10px; height: 10px; background-color: rgba(255, 255, 255, 0.1); border-radius: 50%; transform: translateY(-50%); } .iphone-x .stupid-notch .camera-2:before, .iphone-x .stupid-notch .camera-2:after { position: absolute; content: ''; width: 2px; height: 2px; background-color: #285382; border-radius: 50%; } .iphone-x .stupid-notch .camera-2:before { top: 2px; right: 2px; } .iphone-x .stupid-notch .camera-2:after { top: 2px; left: 2px; } .iphone-x .stupid-notch .speaker { position: absolute; top: 50%; left: 50%; width: 40px; height: 5px; background-color: #222; border-radius: 99px; transform: translate(-50%, -50%); } .iphone-x .status-bar { position: absolute; display: flex; align-items: center; top: 6px; left: 0; width: 100%; height: 30px; color: white; font-family: 'Open Sans', sans-serif; font-size: 14px; } .iphone-x .status-bar .network { position: absolute; left: 30px; font-size: 12px; font-weight: 500; } .iphone-x .status-bar .network i { margin-right: 3px; font-size: 14px; } .iphone-x .status-bar .wifi { position: absolute; right: 65px; } .iphone-x .status-bar .battery { position: absolute; right: 35px; } .iphone-x .time { position: absolute; top: 20%; left: 50%; font-size: 72px; font-weight: 100; color: white; transform: translate(-50%, -50%); } .iphone-x .date { position: absolute; top: 28%; left: 50%; font-size: 18px; font-weight: 100; color: white; letter-spacing: 1px; transform: translate(-50%, -50%); } .iphone-x .flashlight { position: absolute; display: flex; align-items: center; justify-content: center; bottom: 60px; left: 60px; width: 50px; height: 50px; background-color: rgba(0, 0, 0, 0.4); border-radius: 50%; color: white; font-size: 22px; } .iphone-x .camera { position: absolute; display: flex; align-items: center; justify-content: center; bottom: 60px; right: 60px; width: 50px; height: 50px; background-color: rgba(0, 0, 0, 0.4); border-radius: 50%; color: white; font-size: 20px; } .iphone-x .bottom-bar { position: absolute; bottom: 15px; left: 50%; width: 30%; height: 4px; background-color: rgba(255, 255, 255, 0.6); border-radius: 99px; transform: translateX(-50%); }
JAVASCRIPT
Expand for more options Login