Closed Khdulkadir closed 1 month ago
Bomen bewegen op deze manier:
<div class="tree"> <div class="tree-inner"> <div class="tree-top"></div> <div class="tree-bottom"></div> </div> </div> <div class="tree small"> <div class="tree-inner"> <div class="tree-top"></div> <div class="tree-bottom"></div> </div> </div> div.tree { position: absolute; bottom: 0; right: -20%; animation: moveTrees 5s infinite linear; z-index: 2; } div.tree.small { margin-right: 70px; } div.tree div.tree-inner{ position: relative; } div.tree div.tree-top{ background: #228B22; width: 100px; height: 100px; border-radius: 50%; position: absolute; bottom: 100px; left: -25px; } div.tree div.tree-bottom{ background: #8B4513; width: 20px; height: 100px; position: absolute; bottom: 0; left: 15px; } div.tree.small div.tree-top{ background: #228B22; width: 70px; height: 70px; border-radius: 50%; position: absolute; bottom: 70px; left: -25px; } div.tree.small div.tree-bottom{ background: #8B4513; width: 16px; height: 70px; position: absolute; bottom: 0; left: 0; } @keyframes moveTrees { from {right: -20%;} to {right: 200%;} }
Bomen bewegen op deze manier: