CSS Animation Playground
How do I make an css animation playground?
What is a css animation playground? How do you make a css animation playground? This script and codes were developed by Tom Markart on 06 November 2022, Sunday.
CSS Animation Playground - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Animation Playground</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="element"> <button class="spin circle">Hover</button>
</div>
<div class="box"> <div class="ribbon ribbon-top-left"><span>ribbon</span></div><div class="ribbon ribbon-top-right"><span>ribbon</span></div><div class="ribbon ribbon-bottom-left"><span>ribbon</span></div><div class="ribbon ribbon-bottom-right"><span>ribbon</span></div>
</div> <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
</body>
</html>
CSS Animation Playground - Script Codes CSS Codes
html,
body { height: 100%;
}
/* Background */
.element { width: 100%; height: 100%; animation: gradient 20s infinite;
}
@keyframes gradient { 0% { background-color: #718fb6; } 50% { background-color: #354f72; } 100% { background-color: #718fb6; }
}
/* Button */
button { background: none; border: 0; box-sizing: border-box; box-shadow: inset 0 0 0 2px #f45e61; color: #fff; font-size: inherit; font-weight: 700; margin: 1em; padding: 1em 2em; text-align: center; text-transform: capitalize; position: relative; vertical-align: middle;
}
button::before,
button::after { box-sizing: border-box; content: ''; position: absolute; width: 100%; height: 100%;
}
.spin { width: 5em; height: 5em; padding: 0;
}
.spin:hover { text-decoration: underline;
}
.spin::before,
.spin::after { top: 0; left: 0;
}
.spin::before { border: 2px solid transparent;
}
.spin:hover::before { border-top-color: #fff; border-right-color: #fff; border-bottom-color: #fff; -webkit-transition: border-top-color 0.15s linear, border-right-color 0.15s linear 0.1s, border-bottom-color 0.15s linear 0.2s; transition: border-top-color 0.15s linear, border-right-color 0.15s linear 0.1s, border-bottom-color 0.15s linear 0.2s;
}
.spin::after { border: 0 solid transparent;
}
.spin:hover::after { border-top: 2px solid #fff; border-left-width: 2px; border-right-width: 2px; -webkit-transform: rotate(270deg); transform: rotate(270deg); -webkit-transition: border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s; transition: border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s; transition: transform 0.4s linear 0s, border-left-width 0s linear 0.35s; transition: transform 0.4s linear 0s, border-left-width 0s linear 0.35s, -webkit-transform 0.4s linear 0s;
}
.circle { border-radius: 100%; box-shadow: none;
}
.circle::before,
.circle::after { border-radius: 100%;
}
.box { clear: both; position: relative; max-width: 600px; width: 90%; height: 400px; background: #fff; box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}
/* common */
.ribbon { width: 150px; height: 150px; overflow: hidden; position: absolute;
}
.ribbon::before,
.ribbon::after { position: absolute; z-index: -1; content: ''; display: block; border: 5px solid #2980b9;
}
.ribbon span { position: absolute; display: block; width: 225px; padding: 15px 0; background-color: #3498db; box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1); color: #fff; font: 700 18px/1 'Lato', sans-serif; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); text-transform: uppercase; text-align: center;
}
/* top left*/
.ribbon-top-left { top: -10px; left: -10px;
}
.ribbon-top-left::before,
.ribbon-top-left::after { border-top-color: transparent; border-left-color: transparent;
}
.ribbon-top-left::before { top: 0; right: 0;
}
.ribbon-top-left::after { bottom: 0; left: 0;
}
.ribbon-top-left span { right: -25px; top: 30px; transform: rotate(-45deg);
}
/* top right*/
.ribbon-top-right { top: -10px; right: -10px;
}
.ribbon-top-right::before,
.ribbon-top-right::after { border-top-color: transparent; border-right-color: transparent;
}
.ribbon-top-right::before { top: 0; left: 0;
}
.ribbon-top-right::after { bottom: 0; right: 0;
}
.ribbon-top-right span { left: -25px; top: 30px; transform: rotate(45deg);
}
/* bottom left*/
.ribbon-bottom-left { bottom: -10px; left: -10px;
}
.ribbon-bottom-left::before,
.ribbon-bottom-left::after { border-bottom-color: transparent; border-left-color: transparent;
}
.ribbon-bottom-left::before { bottom: 0; right: 0;
}
.ribbon-bottom-left::after { top: 0; left: 0;
}
.ribbon-bottom-left span { right: -25px; bottom: 30px; transform: rotate(225deg);
}
/* bottom right*/
.ribbon-bottom-right { bottom: -10px; right: -10px;
}
.ribbon-bottom-right::before,
.ribbon-bottom-right::after { border-bottom-color: transparent; border-right-color: transparent;
}
.ribbon-bottom-right::before { bottom: 0; left: 0;
}
.ribbon-bottom-right::after { top: 0; right: 0;
}
.ribbon-bottom-right span { left: -25px; bottom: 30px; transform: rotate(-225deg);
}
Developer | Tom Markart |
Username | tmarkart |
Uploaded | November 06, 2022 |
Rating | 3 |
Size | 3,948 Kb |
Views | 18,216 |
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 |
Story Detail 0.5 | 15,495 Kb |
Story Detail 1.0 | 16,604 Kb |
Story Detail 1.0b | 17,747 Kb |
Election Widget Vertical | 5,470 Kb |
Navigation Hover | 2,486 Kb |
Story Card Expand Details | 4,759 Kb |
McClatchy Newsrooms | 3,565 Kb |
Slide out nav | 5,807 Kb |
Skewed Header - svg | 2,562 Kb |
Overlay nav | 2,756 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 |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
A Pen by Moeid Saleem | Moeidsaleem | 1,862 Kb |
Header Line Issue | Charlie-volpe | 1,768 Kb |
A Pen by Final Boss tommyb9 | FBtommyb9 | 55,354 Kb |
Wikipedia viewer | Chpecson | 2,865 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
Menu | Vivi_Lai | 1,210 Kb |
Slim Grid SASS SCSS v3.2 | Thesturs | 4,709 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!