UI Elements - Flat Design
How do I make an ui elements - flat design?
UI Elements developed based on flat design with CSS3. What is a ui elements - flat design? How do you make a ui elements - flat design? This script and codes were developed by Emerson Thompson on 11 August 2022, Thursday.
UI Elements - Flat Design - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>UI Elements - Flat Design</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<!-- Switch-->
<div class="item">Switch <div class="switch"> <input id="switch" type="checkbox" hidden="hidden"/> <label for="switch"></label> </div>
</div>
<!-- Checkbox-->
<div class="item">Checkbox <div class="checkbox"> <input type="checkbox" name="checkbox" checked="checked"/> <input type="checkbox" name="checkbox"/> </div>
</div>
<!-- Radio-->
<div class="item">Radio <div class="radio"> <label for="radio1"> <input id="radio1" type="radio" name="radio" checked="checked"/><span class="outer"><span class="inner"></span></span> </label> <label for="radio2"> <input id="radio2" type="radio" name="radio"/><span class="outer"><span class="inner"></span></span> </label> </div>
</div>
</body>
</html>
UI Elements - Flat Design - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Roboto);
.switch label { display: block; width: 44px; height: 16px; border-radius: 10px; background: rgba(189, 195, 199, 0.5); vertical-align: middle; position: relative; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: background 350ms ease; transition: background 350ms ease;
}
.switch label:before, .switch label:after { content: ""; display: block; width: 22px; height: 22px; border-radius: 50%; position: absolute; top: 50%; -webkit-transition: all 120ms linear; transition: all 120ms linear;
}
.switch label:before { background: rgba(189, 195, 199, 0.07); -webkit-transform: translate3d(0, -50%, 0) scale(0); transform: translate3d(0, -50%, 0) scale(0);
}
.switch label:after { background: #bdc3c7; -webkit-transform: translate3d(0, -50%, 0); transform: translate3d(0, -50%, 0);
}
.switch input:checked + label { background: rgba(142, 68, 173, 0.6);
}
.switch input:checked + label:before { background: rgba(142, 68, 173, 0.07); -webkit-transform: translate3d(100%, -50%, 0) scale(1); transform: translate3d(100%, -50%, 0) scale(1);
}
.switch input:checked + label:after { background: #8e44ad; -webkit-transform: translate3d(100%, -50%, 0); transform: translate3d(100%, -50%, 0);
}
/* _______________________________________________________ */
.checkbox input[type="checkbox"] { position: relative; margin: 0 10px;
}
.checkbox input[type="checkbox"]:before { border: 2px solid transparent; content: ""; cursor: pointer; display: block; height: 17px; position: absolute; -webkit-transition: all 200ms linear; transition: all 200ms linear; width: 17px; z-index: 1;
}
.checkbox input[type="checkbox"]:checked:before { border-color: #8e44ad; border-top-style: none; border-right-style: none; height: 10px; -webkit-transform: rotate(-45deg); transform: rotate(-45deg);
}
.checkbox input[type="checkbox"]:after { background: #FFFFFF; content: ""; display: block; height: 17px; position: absolute; border: 2px solid rgba(189, 195, 199, 0.5); top: 0; width: 17px; z-index: 0;
}
/* _______________________________________________________ */
.radio label { display: inline-block; cursor: pointer;
}
.radio label:hover .inner { -webkit-transform: scale(0.5); transform: scale(0.5); opacity: 0.5;
}
.radio label input { width: 1px; height: 1px; opacity: 0;
}
.radio label input:checked + .outer .inner { -webkit-transform: scale(1); transform: scale(1); opacity: 1;
}
.radio label input:checked + .outer { border: 3px solid #8e44ad;
}
.radio label input:focus + .outer .inner { -webkit-transform: scale(1); transform: scale(1); opacity: 1; background-color: #8e44ad;
}
.radio label .outer { width: 20px; height: 20px; display: block; float: left; margin: 0 5px; -webkit-transition: all 150ms linear; transition: all 150ms linear; border: 3px solid rgba(189, 195, 199, 0.5); border-radius: 50%; background-color: #fff;
}
.radio label .outer .inner { -webkit-transition: all 150ms linear; transition: all 150ms linear; width: 14px; height: 14px; -webkit-transform: scale(0); transform: scale(0); display: block; margin: 3px; border-radius: 50%; background-color: #8e44ad; opacity: 0;
}
/* _______________________________________________________ */
html, body { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; height: 100%; font-family: "Roboto", sans-serif;
}
html .item, body .item { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; min-width: 100px; min-height: 100px; border: 1px solid rgba(189, 195, 199, 0.2); margin: 15px; padding: 0 10px;
}
html .item div, body .item div { margin-top: 20px;
}
![UI Elements - Flat Design - Script Codes](http://shots.codepen.io/thompsonemerson/pen/OMNXxW-512.jpg)
Developer | Emerson Thompson |
Username | thompsonemerson |
Uploaded | August 11, 2022 |
Rating | 3 |
Size | 3,994 Kb |
Views | 36,432 |
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 |
Logo Hover Animate CSS3 | 1,517 Kb |
Filtro de palavras com JavaScript | 2,400 Kb |
Hello World - ReactJS | 2,686 Kb |
Custom Audio Player with YouTube API | 4,077 Kb |
Hashtag Instagram - jQuery | 2,438 Kb |
Hello World - Angular 2 | 2,964 Kb |
Brazil Map SVG | 21,910 Kb |
Minimalist Email - Flex Box | 3,540 Kb |
Milligram - Logo Animation SVG | 2,955 Kb |
Only One Checkbox Selected | 1,957 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 |
CodeCamp Tribute Page | JonathanDeJesus | 6,860 Kb |
SVG Text Masking | JMChristensen | 2,141 Kb |
Basic jQuery Filter list | Mtedwards | 2,464 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
Pure CSS Read More Arrow | Zephyr | 1,747 Kb |
To Do List with Delete | Mattlbrody | 2,068 Kb |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
RPG Style Text Dialogue | Odylic | 2,635 Kb |
Long Shadow Button | Uixcrazy | 3,550 Kb |
Haml Calendar | Katydecorah | 5,643 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!