* { box-sizing: border-box; } body { background-color: #111; height: 100vh; overflow: hidden; margin: 0; } .container { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; } .square { background-color: #1d1d1d; box-shadow: 0 0 2px #000; height: 16px; width: 16px; margin: 2px; transition: 2s ease; } .size{ height: 20px !important; width: 20px !important; border-radius: 50%; transition: 0.3s; } .square:hover { transition-duration: 0s; }