JSFiddle - React, Tailwind, and code Playground

by der_robert

HTML

<div class="trailer">
  <div class="wheel1"></div>
  <div class="wheel2"></div>
  <div class="window1"></div>
  <div class="window2"></div>
  <div class="tow-bar"></div>
</div>

CSS

body {
    background-color: #dfe7e9;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .trailer {
    position: relative;
    width: 200px;
    height: 120px;
    background-color: #f5f5f5;
    border: 4px solid #000;
    border-radius: 10px;
  }
  .wheel1 {
    position: absolute;
    bottom: -16px;
    width: 40px;
    height: 40px;
    background-color: #000;
    border-radius: 50%;
    left: 55px;
  }
  .wheel1:after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
  }
  .wheel2 {
    position: absolute;
    bottom: -16px;
    width: 40px;
    height: 40px;
    background-color: #000;
    border-radius: 50%;
    left: 105px;
  }
  .wheel2:after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-radius: 50%;
  }
  .window1 {
    position: absolute;
    top: 10px;
    left: 55px;
    width: 70px;
    height: 60px;
    background-color: #79a7ac;
    border: 2px solid #000;
    transform: translateX(-50%);
  }
  .window2 {
    position: absolute;
    top: 10px;
    left: 145px;
    width: 70px;
    height: 60px;
    background-color: #79a7ac;
    border: 2px solid #000;
    transform: translateX(-50%);
  }
  .tow-bar {
    position: absolute;
    left: 228px;
    bottom: -4px;
    width: 60px;
    height: 8px;
    background-color: #000;
    transform: translateX(-50%);
  }