Sunny

Developer
Size
3,674 Kb
Views
10,120

How do I make an sunny?

Based on https://dribbble.com/shots/2114529. What is a sunny? How do you make a sunny? This script and codes were developed by David Hartley on 18 November 2022, Friday.

Sunny Previews

Sunny - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Sunny</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { width: 100%; height: 100%; background-color: #0093FF; overflow: hidden;
}
.sun { position: absolute; top: 50%; left: 50%; width: 50vmin; height: 50vmin; margin: -25vmin; animation: float 5s infinite;
}
.sun .orays { animation: ospin 10s infinite linear;
}
.sun .orays, .sun .orays::before, .sun .orays::after { position: absolute; width: 100%; height: 100%; border-radius: 5%; background-color: #FFFFFF;
}
.sun .orays::before { content: ""; transform: rotate(30deg);
}
.sun .orays::after { content: ""; transform: rotate(60deg);
}
.sun .oface { position: absolute; margin: -10%; width: 120%; height: 120%; border-radius: 100%; background-color: #FFFFFF; transform: scale(1.05);
}
.sun .rays { animation: spin 10s infinite linear;
}
.sun .rays, .sun .rays::before, .sun .rays::after { position: absolute; width: 100%; height: 100%; border-radius: 5%; background-color: #FFB02B;
}
.sun .rays::before { content: ""; transform: rotate(30deg);
}
.sun .rays::after { content: ""; transform: rotate(60deg);
}
.sun .face { position: relative; margin: -10%; width: 120%; height: 120%; border-radius: 100%; background-color: #FFB02B;
}
.sun .face::before { content: ""; position: absolute; top: 5%; left: 5%; width: 90%; height: 90%; border-radius: 100%; background-color: #FFEC00;
}
.sun .face .eye { position: absolute; top: 40%; width: 7%; height: 7%; border-radius: 100%; background-color: #756B01; transform: translateY(-50%); animation: blink 15s infinite;
}
.sun .face .left.eye { left: 25%;
}
.sun .face .right.eye { right: 25%;
}
.sun .face .cheek { position: absolute; top: 46%; width: 4%; height: 4%; border-radius: 100%; background-color: rgba(255, 176, 43, 0.6); transform: scale(2.5, 0.75);
}
.sun .face .left.cheek { left: 25%;
}
.sun .face .right.cheek { right: 25%;
}
.sun .face .mouth { position: absolute; top: 42%; left: 35%; width: 30%; height: 16%; border-radius: 20% 20% 60% 60% / 30% 30% 100% 100%; background-color: #756B01; overflow: hidden; transform: translate(0);
}
.sun .face .mouth::after { content: ""; position: absolute; top: 30%; left: 15%; width: 70%; height: 100%; border-radius: 100%; background-color: #F04E50;
}
@keyframes blink { 0% { height: 1%; } 2% { height: 7%; } 100% { height: 7%; }
}
@keyframes float { 0% { margin-top: -22vmin; } 50% { margin-top: -27vmin; } 100% { margin-top: -22vmin; }
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
@keyframes ospin { 0% { transform: scale(1.05) rotate(0deg); } 100% { transform: scale(1.05) rotate(360deg); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="sun"> <div class="orays"></div> <div class="oface"></div> <div class="rays"></div> <div class="face"> <div class="left eye"></div> <div class="right eye"></div> <div class="left cheek"></div> <div class="right cheek"></div> <div class="mouth"></div> </div>
</div>
</body>
</html>

Sunny - Script Codes CSS Codes

body { width: 100%; height: 100%; background-color: #0093FF; overflow: hidden;
}
.sun { position: absolute; top: 50%; left: 50%; width: 50vmin; height: 50vmin; margin: -25vmin; animation: float 5s infinite;
}
.sun .orays { animation: ospin 10s infinite linear;
}
.sun .orays, .sun .orays::before, .sun .orays::after { position: absolute; width: 100%; height: 100%; border-radius: 5%; background-color: #FFFFFF;
}
.sun .orays::before { content: ""; transform: rotate(30deg);
}
.sun .orays::after { content: ""; transform: rotate(60deg);
}
.sun .oface { position: absolute; margin: -10%; width: 120%; height: 120%; border-radius: 100%; background-color: #FFFFFF; transform: scale(1.05);
}
.sun .rays { animation: spin 10s infinite linear;
}
.sun .rays, .sun .rays::before, .sun .rays::after { position: absolute; width: 100%; height: 100%; border-radius: 5%; background-color: #FFB02B;
}
.sun .rays::before { content: ""; transform: rotate(30deg);
}
.sun .rays::after { content: ""; transform: rotate(60deg);
}
.sun .face { position: relative; margin: -10%; width: 120%; height: 120%; border-radius: 100%; background-color: #FFB02B;
}
.sun .face::before { content: ""; position: absolute; top: 5%; left: 5%; width: 90%; height: 90%; border-radius: 100%; background-color: #FFEC00;
}
.sun .face .eye { position: absolute; top: 40%; width: 7%; height: 7%; border-radius: 100%; background-color: #756B01; transform: translateY(-50%); animation: blink 15s infinite;
}
.sun .face .left.eye { left: 25%;
}
.sun .face .right.eye { right: 25%;
}
.sun .face .cheek { position: absolute; top: 46%; width: 4%; height: 4%; border-radius: 100%; background-color: rgba(255, 176, 43, 0.6); transform: scale(2.5, 0.75);
}
.sun .face .left.cheek { left: 25%;
}
.sun .face .right.cheek { right: 25%;
}
.sun .face .mouth { position: absolute; top: 42%; left: 35%; width: 30%; height: 16%; border-radius: 20% 20% 60% 60% / 30% 30% 100% 100%; background-color: #756B01; overflow: hidden; transform: translate(0);
}
.sun .face .mouth::after { content: ""; position: absolute; top: 30%; left: 15%; width: 70%; height: 100%; border-radius: 100%; background-color: #F04E50;
}
@keyframes blink { 0% { height: 1%; } 2% { height: 7%; } 100% { height: 7%; }
}
@keyframes float { 0% { margin-top: -22vmin; } 50% { margin-top: -27vmin; } 100% { margin-top: -22vmin; }
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }
}
@keyframes ospin { 0% { transform: scale(1.05) rotate(0deg); } 100% { transform: scale(1.05) rotate(360deg); }
}
Sunny - Script Codes
Sunny - Script Codes
Home Page Home
Developer David Hartley
Username davidhartley
Uploaded November 18, 2022
Rating 4.5
Size 3,674 Kb
Views 10,120
Do you need developer help for Sunny?

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!

David Hartley (davidhartley) Script Codes
Create amazing love letters 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!