Sloth
How do I make an sloth?
Sometimes when you ride a train there's not much else to do than to code a sloth in css and html. What is a sloth? How do you make a sloth? This script and codes were developed by Andreas Nylin on 30 September 2022, Friday.
Sloth - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sloth</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="branch"></div>
<div class="sloth"> <div class="body"></div> <div class="leg"></div> <div class="leg"></div> <div class="leg"></div> <div class="leg"></div> <div class="head"> <div class="face"> <div class="eye"></div> <div class="eye"></div> <div class="nose"></div> <div class="mouth"></div> </div> </div>
</div>
</body>
</html>
Sloth - Script Codes CSS Codes
body { background: aquamarine; margin: 0; height: 100%; width: 100%; font-size: 6px;
}
@media (min-width: 480px) { body { font-size: 8px; }
}
@media (min-width: 768px) { body { font-size: 12px; }
}
div { position: absolute;
}
.branch { top: 11.5em; left: 0; width: 100%; height: 2.5em; background: sienna;
}
.sloth { top: 10em; left: 50%; margin-left: -20em; width: 40em; height: 30em;
}
.body { top: 15em; left: 0; width: 40em; height: 15em; border-radius: 0 0 15em 15em; background: peru;
}
.leg { top: 0; left: 0; width: 5em; height: 15em; border-radius: 5em 5em 0 0; background: peru;
}
.leg + .leg { left: 5.5em; background: sienna;
}
.leg + .leg + .leg { left: 14em; background: peru;
}
.leg + .leg + .leg + .leg { left: 19.5em; background: sienna;
}
.head { top: 2.5em; left: 25em; width: 15em; height: 15em; border-radius: 50% 50% 2.5em 0; background: peru;
}
.face { overflow: hidden; top: 1em; left: 1em; width: 13em; height: 13em; background: beige; border-radius: 50% 50%;
}
.nose { top: 7em; left: 5em; width: 3em; height: 2em; background: #371e00; border-radius: 1em;
}
.eye { top: 4em; left: -2em; width: 7em; height: 3em; background: #371e00; border-radius: 1.75em; transform: rotate(-10deg);
}
.eye:after { position: absolute; content: ''; top: .5em; right: .5em; width: 2em; height: 2em; background: #fff; border-radius: 50%; animation: blink 15s linear infinite;
}
.eye + .eye { left: auto; right: -2em; transform: rotate(10deg) scale(-1, 1);
}
.mouth { top: 6em; left: 3.75em; width: 5em; height: 4em; border-bottom: solid 3px #371e00; border-left: solid 3px transparent; border-right: solid 3px transparent; border-radius: 50%;
}
@keyframes blink { 1% { margin-top: 1em; height: .5em; border-radius: 25%; } 5% { margin-top: 1em; height: .5em; border-radius: 25%; } 6% { margin-top: 0; height: 2em; border-radius: 50%; } 100% { height: 2em; }
}
Developer | Andreas Nylin |
Username | andreasnylin |
Uploaded | September 30, 2022 |
Rating | 3.5 |
Size | 2,080 Kb |
Views | 20,240 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Polar bear | 3,471 Kb |
In an alternate dimension where GeoCities prospered and took over the internet... | 3,088 Kb |
Responsive fixed image, fluid content | 2,056 Kb |
CSS 3D Radio buttons | 1,650 Kb |
CSS 3D Cube | 2,984 Kb |
CSS checkbox and radio button | 2,208 Kb |
Code Monkey | 2,610 Kb |
HTML Dialog Element Test | 2,902 Kb |
AngularJS custom tooltip directive | 3,201 Kb |
CSS target the middle element | 1,657 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Ball Physics | Getsetbro | 3,149 Kb |
Basic HTML Slideshow | Tomhodgins | 3,386 Kb |
A Pen by Anoop | Anoopjohn | 330,760 Kb |
Algorithm practice | Abensur | 5,620 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
A Pen by Shidhin | Shidhincr | 5,015 Kb |
Pure CSS albums gallery | Renaudtertrais | 2,978 Kb |
IbrahimJabbari-Effect21 | Ibrahimjabbari | 1,882 Kb |
Hmmm... | Rk007 | 4,848 Kb |
Vue.js Lazy Loading | Kjbrum | 3,620 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!