Pure CSS Only Snackbar
How do I make an pure css only snackbar?
Using only CSS get a snackbar that slides up and in, and click to dismiss.. What is a pure css only snackbar? How do you make a pure css only snackbar? This script and codes were developed by Tom on 19 November 2022, Saturday.
Pure CSS Only Snackbar - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Only Snackbar</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="snack-wrap"> <input type="checkbox" class="snackclose animated" id="close"/><label class="snacklable animated" for="close"></label> <div class="snackbar animated"> <p><strong>Notice:</strong> This is a pure CSS snackbar. Click to dismiss.</p> </div>
</div>
<p>CSS Only Snackbar, uses checkbox:checked to change animation, with covering lable to set checked.</p>
</body>
</html>
Pure CSS Only Snackbar - Script Codes CSS Codes
.snack-wrap { display:block; position:fixed; bottom:0px; left:10px; padding:0px;
}
.snackbar { display:block; background:#222; border:#f2f2f2; padding:10px 40px 10px 20px; color:#fff; font-family:Arial; position:relative; left:0px; bottom:-70px; transition: bottom 0.5s ease-in-out; z-index:9;
}
.snackclose, label { bottom:-70px; position:absolute; border:0;
}
.snackclose { display:none; z-index:10;
}
label { z-index:11; display:block; width:100%; height:100%; color:rgba(255,255,255,0.8); cursor:pointer;
}
.animated { animation-name: snackbar-show; animation-duration: 5s; animation-direction: forwards; animation-timing-function: ease-in-out; animation-delay:1s; animation-fill-mode: forwards;
}
.snackclose:checked~.snackbar, .snackclose:checked, .snackclose:checked+label { animation-name: snackbar-hide; animation-delay:0s;
}
@keyframes snackbar-show { 0%{ bottom:-70px; } 90%, 95% {bottom:15px; } 92.5%, 100% {bottom:10px; }
}
@keyframes snackbar-hide { 0%, 7.5% {bottom:10px; } 5%,10% {bottom:15px; } 100% {bottom:-70px; }
}
Developer | Tom |
Username | TomJ1588 |
Uploaded | November 19, 2022 |
Rating | 3 |
Size | 1,973 Kb |
Views | 50,600 |
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 |
Left Side Slide Out Push Nav | 3,009 Kb |
Pure CSS Animated Modals | 2,830 Kb |
A Pen by Tom | 4,910 Kb |
Swing In Social Links | 2,157 Kb |
Editor Test | 5,749 Kb |
UI Test 2 | 2,968 Kb |
ESPN Style Navigation | 2,593 Kb |
Luke ROTJ Lightsaber | 2,758 Kb |
CSS Only Line Animated Modal | 2,502 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 |
Animated Logo | Shakdaniel | 2,672 Kb |
Halo 5 REQ Guide Bookmarklet | Cwacht | 3,993 Kb |
IE11 Test | Boostnewmedia | 4,998 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
CSS3 Form Page Design | Rssatnam | 3,613 Kb |
Isometric css island | Xaddict | 2,950 Kb |
This in constructor context | _shree33 | 1,718 Kb |
React Recipe Box | Krokodill | 5,347 Kb |
Placeholder support for contentEditable elements, without JavaScript | Flesler | 1,863 Kb |
Bootstrap 4 Gridsystem Demo | Rivella50 | 1,535 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!