Cool toggle with filling effect
How do I make an cool toggle with filling effect?
Inspired by the HD-toggle of vimeo -made with text stroke, background position, css3 transitions and a little bit jquery ;). What is a cool toggle with filling effect? How do you make a cool toggle with filling effect? This script and codes were developed by Gabriel on 18 July 2022, Monday.
Cool toggle with filling effect - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>cool toggle with filling effect</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://fonts.googleapis.com/css?family=Raleway:100,900'> <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 { background-color: #444;
}
.hd { margin: 50px auto; width: 500px; height: 180px; text-align: center; font-family: 'Raleway', sans-serif; font-weight: 900; text-stroke: 5px #eee; color: transparent; font-size: 180px; font-style: italic; letter-spacing: -10px; background: linear-gradient( to bottom, transparent 0%, transparent 49%, #eeeeee 50%, #eeeeee 100% ); background-size: 100% 205%; -webkit-background-clip: text; background-clip: text; transition: background .75s; cursor: pointer;
}
.hd-click { background-position: 100% 100%;
}
.info { position: absolute; right: 3px; top: 3px; font-size: 13px; color: #ccc; font-family: 'Raleway', sans-serif; font-weight: 100;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="hd">HD</div>
<div class="info">(click on HD)</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Cool toggle with filling effect - Script Codes CSS Codes
body { background-color: #444;
}
.hd { margin: 50px auto; width: 500px; height: 180px; text-align: center; font-family: 'Raleway', sans-serif; font-weight: 900; text-stroke: 5px #eee; color: transparent; font-size: 180px; font-style: italic; letter-spacing: -10px; background: linear-gradient( to bottom, transparent 0%, transparent 49%, #eeeeee 50%, #eeeeee 100% ); background-size: 100% 205%; -webkit-background-clip: text; background-clip: text; transition: background .75s; cursor: pointer;
}
.hd-click { background-position: 100% 100%;
}
.info { position: absolute; right: 3px; top: 3px; font-size: 13px; color: #ccc; font-family: 'Raleway', sans-serif; font-weight: 100;
}
Cool toggle with filling effect - Script Codes JS Codes
$('.hd').click(function(){ $(this).toggleClass('hd-click');
});
Developer | Gabriel |
Username | gab |
Uploaded | July 18, 2022 |
Rating | 4 |
Size | 2,499 Kb |
Views | 28,336 |
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 |
Chrome notifications test | 3,589 Kb |
Inline editing with jquery | 2,576 Kb |
CSS3 Login | 3,115 Kb |
Projects page | 4,147 Kb |
HINT.css - just a little test | 1,926 Kb |
A clicking cookie gaaaame... | 16,067 Kb |
Font awesome Hamburger-Menu-Toggle | 2,191 Kb |
Loggy.js - CSS formatted JS console logs | 2,204 Kb |
Picture overlay | 2,450 Kb |
Replace a not existing img | 2,026 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 |
Horizontal scroll fixed element | HerrSerker | 0 Kb |
Main page display | BarryKe | 4,562 Kb |
Guage | Roygwells | 5,653 Kb |
Simple animated hover effect | Pobee-norris | 3,044 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
GsuiPopup | Mr21 | 2,641 Kb |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Responsive Pricing Table | Jeremycaris | 2,690 Kb |
Bubble animation | Ftabor | 6,565 Kb |
CSSOff 2013 Submission | Codewunder | 14,766 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!