Pure CSS Switch - Material Design (mdl) inspired
How do I make an pure css switch - material design (mdl) inspired?
A simple pure CSS switch Material Design (mdl) inspired.. What is a pure css switch - material design (mdl) inspired? How do you make a pure css switch - material design (mdl) inspired? This script and codes were developed by Jordana Morais on 28 November 2022, Monday.
Pure CSS Switch - Material Design (mdl) inspired - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Switch - Material Design (mdl) inspired</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<h2 class="page-title">Pure CSS Switch - Material Design (mdl) inspired</h2>
<div class="wrapper"> <div class="pure-css-switch dark-bg"> <label>Switch me <input class="simple-switch-input" type="checkbox" checked="checked"/><span class="simple-switch dark"></span> </label> </div>
</div> <script src="js/index.js"></script>
</body>
</html>
Pure CSS Switch - Material Design (mdl) inspired - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600);
.simple-switch-input { position: absolute; width: 0; height: 0; margin: 0; padding: 0; opacity: 0; -ms-appearance: none; -moz-appearance: none; -webkit-appearance: none; appearance: none; border: none;
}
.simple-switch { -webkit-appearance: none; -moz-appearance: none; -webkit-transition: .4s all; transition: .4s all; margin: 0 15px; border-radius: 50px; background: #bbb; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); width: 36px; height: 14px; outline: 0; cursor: pointer; position: relative; -moz-user-select: none; -webkit-user-select: none; user-select: none; display: inline-block; top: 3px;
}
/* switch background */
.simple-switch-input:checked ~ .simple-switch { background: #84B6D8; box-shadow: inset 0 0 0 15px #84B6D8; transition: .25s all;
}
.simple-switch-input:checked ~ .simple-switch.dark { background: #0098FF; box-shadow: inset 0 0 0 15px #0098FF;
}
.simple-switch-input:checked ~ .simple-switch::before { transform: translate(18px, 0); background: #006CB5; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 0 0 16px rgba(0, 108, 181, 0);
}
.simple-switch-input:checked ~ .simple-switch.dark::before { background: #99D6FF;
}
.simple-switch-input ~ .simple-switch::before { content: ''; transition: .26s all; position: absolute; left: 0px; top: -3px; bottom: 2px; right: auto; transform: translate(0, 0); display: block; width: 20px; height: 20px; border-radius: 40px; background: #fff; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 0 0 16px rgba(0, 108, 181, 0);
}
/* switch circle */
.simple-switch.dark:active::before { box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 0 0 16px rgba(89, 189, 255, 0.6);
}
/* Just page formatting */
body { font-family: "Open sans", sans-serif; background: linear-gradient(45deg, #fd7a86, #be83ff); height: 100vh; margin: 0;
}
.page-title { background: #2c3e50; font-weight: 600; font-size: 1.8em; color: rgba(255, 255, 255, 0.57); margin: 0; padding: 20px 0; text-align: center; box-shadow: 0 0px 2px 1px rgba(44, 62, 80, 0.4);
}
.wrapper { display: table; margin: 80px auto; border-radius: 4px; box-shadow: 0 0 1px 1px rgba(255, 255, 255, 0.11), 0 0 40px -4px rgba(255, 255, 255, 0.3);
}
.pure-css-switch { background: #e8e8e8; padding: 15px; margin: 15px; border-radius: 4px; float: left; box-shadow: 1px 2px 4px 0px rgba(19, 19, 19, 0.38);
}
.pure-css-switch.dark-bg { background: #2c3e50; color: #fff;
}
Pure CSS Switch - Material Design (mdl) inspired - Script Codes JS Codes
/* Not this time ¦) */
Developer | Jordana Morais |
Username | jordanamorais |
Uploaded | November 28, 2022 |
Rating | 3.5 |
Size | 3,872 Kb |
Views | 30,360 |
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 |
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 |
Image Stack Test SCSS | CalvinMorett | 2,799 Kb |
Tumblr API | Juanv911 | 2,436 Kb |
CSS Donut Charts | Seanstopnik | 2,908 Kb |
Basic HTML5 Structure | YuvarajTana | 1,289 Kb |
Multicolumns 2 | Raphaelgoetter | 1,857 Kb |
SVG Hover Animations | Kjbrum | 10,557 Kb |
Countdown Timer | Massiebn | 3,001 Kb |
Polygon Logo in CSS | Kai | 3,412 Kb |
E-mail Template | SoloMDFK | 4,871 Kb |
Fullscreen Parallax | Bassta | 3,313 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!