DevPlatform
Home
Components
Search
Submit
Earn
Login
Sign Up Free
Car Moving - Preview | DevPlatform
DevPlatform
Categories
Accordion
Animation
Box Shadow
Button
Card
Footer
Form
Gallery
Hero Section
Inputs
Loader
Marquee
Modal
Modules
Navbar
Progress Bar
Radio Buttons
Search-Bar
Sections
Slider
Tab
Timeline
Toggle
Car Moving
aartigoyal
Jan 30, 2026
4
0
Share
Live Preview
Refresh
Live Editor
HTML
CSS
JS
HTML
CSS
JavaScript
1
<div class="sun"></div> <div class="cloud cloud1"></div> <div class="cloud cloud2"></div> <div class="tree tree1"> <div class="leaves"></div> <div class="trunk"></div> </div> <div class="tree tree2"> <div class="leaves"></div> <div class="trunk"></div> </div> <div class="road"></div> <div class="car"> <div class="car-top"> <div class="window window-front"></div> <div class="window window-back"></div> </div> <div class="car-body"></div> <div class="wheel wheel-front"></div> <div class="wheel wheel-back"></div> </div>
1
* { margin: 0; padding: 0; box-sizing: border-box; } body { overflow: hidden; background: linear-gradient(to bottom, #87CEEB 0%, #87CEEB 70%, #90EE90 70%, #90EE90 100%); height: 100vh; display: flex; align-items: center; justify-content: center; } .road { position: absolute; bottom: 0; width: 100%; height: 200px; background: #555; overflow: hidden; } .road::before { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 200%; height: 10px; background: repeating-linear-gradient( to right, #fff 0px, #fff 60px, transparent 60px, transparent 120px ); animation: roadMove 2s linear infinite; } @keyframes roadMove { 0% { left: 0; } 100% { left: -120px; } } .car { position: absolute; bottom: 60px; left: -200px; width: 150px; height: 80px; animation: carMove 8s linear infinite; } @keyframes carMove { 0% { left: -200px; } 100% { left: 100%; } } .car-body { position: absolute; bottom: 20px; width: 150px; height: 40px; background: #e74c3c; border-radius: 10px 50px 10px 10px; } .car-top { position: absolute; bottom: 40px; left: 30px; width: 80px; height: 35px; background: #e74c3c; border-radius: 15px 15px 0 0; } .window { position: absolute; background: #5DADE2; border: 2px solid #34495e; } .window-front { top: 5px; right: 5px; width: 35px; height: 25px; border-radius: 8px 8px 0 0; } .window-back { top: 5px; left: 5px; width: 30px; height: 25px; border-radius: 8px 8px 0 0; } .wheel { position: absolute; width: 30px; height: 30px; background: #2c3e50; border-radius: 50%; border: 4px solid #34495e; animation: wheelRotate 0.5s linear infinite; } @keyframes wheelRotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .wheel::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background: #7f8c8d; border-radius: 50%; } .wheel-front { bottom: 0; right: 15px; } .wheel-back { bottom: 0; left: 15px; } .sun { position: absolute; top: 50px; right: 100px; width: 80px; height: 80px; background: #f39c12; border-radius: 50%; box-shadow: 0 0 40px rgba(243, 156, 18, 0.6); } .cloud { position: absolute; background: white; border-radius: 50px; opacity: 0.8; } .cloud1 { top: 80px; left: 100px; width: 100px; height: 40px; animation: cloudMove 20s linear infinite; } .cloud1::before { content: ''; position: absolute; top: -20px; left: 20px; width: 50px; height: 50px; background: white; border-radius: 50%; } .cloud2 { top: 150px; right: 150px; width: 120px; height: 45px; animation: cloudMove 25s linear infinite; } .cloud2::before { content: ''; position: absolute; top: -25px; left: 30px; width: 60px; height: 60px; background: white; border-radius: 50%; } @keyframes cloudMove { 0% { transform: translateX(0); } 100% { transform: translateX(-100vw); } } .tree { position: absolute; bottom: 200px; } .trunk { width: 20px; height: 40px; background: #8B4513; margin: 0 auto; } .leaves { width: 60px; height: 60px; background: #228B22; border-radius: 50%; position: relative; margin: 0 auto; } .tree1 { left: 200px; animation: treeMove 8s linear infinite; } .tree2 { right: 300px; animation: treeMove 8s linear infinite 2s; } @keyframes treeMove { 0% { transform: translateX(0); } 100% { transform: translateX(-120vw); } }
1
Comments
0
Want to comment?
Please
login
or
sign up
to post comments.
No comments yet
Be the first to comment on this component!
Comments 0
Want to comment?
Please login or sign up to post comments.
No comments yet
Be the first to comment on this component!