Sloth

Developer
Size
2,080 Kb
Views
20,240

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 Previews

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; }
}
Sloth - Script Codes
Sloth - Script Codes
Home Page Home
Developer Andreas Nylin
Username andreasnylin
Uploaded September 30, 2022
Rating 3.5
Size 2,080 Kb
Views 20,240
Do you need developer help for Sloth?

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!

Andreas Nylin (andreasnylin) Script Codes
Create amazing art & images with AI!

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!