Color accordion
How do I make an color accordion?
What is a color accordion? How do you make a color accordion? This script and codes were developed by Kasper Mikiewicz on 21 November 2022, Monday.
Color accordion - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Color accordion</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <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! */ .accordion { display: table; width: 100%;
}
.accordion > input { display: none;
}
.accordion > input:checked + .accordion__item { width: 2em;
}
.accordion__item { cursor: pointer; display: table-cell; width: 1em; height: 4em; transition: .25s ease;
}
.accordion .accordion__item:hover { display: table-cell; width: 2em;
}
h1 { text-align: center;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="accordion"> <input id="color-2ecc71" name="color" type="radio"> <label style="background:#2ecc71" for="color-2ecc71" class="accordion__item"></label> <input id="color-e74c3c" name="color" type="radio"> <label style="background:#e74c3c" for="color-e74c3c" class="accordion__item"></label> <input id="color-3498db" name="color" type="radio"> <label style="background:#3498db" for="color-3498db" class="accordion__item"></label> <input id="color-f1c40f" name="color" type="radio"> <label style="background:#f1c40f" for="color-f1c40f" class="accordion__item"></label>
</div>
<h1>Color accordion</h1>
</body>
</html>
Color accordion - Script Codes CSS Codes
.accordion { display: table; width: 100%;
}
.accordion > input { display: none;
}
.accordion > input:checked + .accordion__item { width: 2em;
}
.accordion__item { cursor: pointer; display: table-cell; width: 1em; height: 4em; transition: .25s ease;
}
.accordion .accordion__item:hover { display: table-cell; width: 2em;
}
h1 { text-align: center;
}
Developer | Kasper Mikiewicz |
Username | Idered |
Uploaded | November 21, 2022 |
Rating | 3.5 |
Size | 1,925 Kb |
Views | 22,264 |
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 |
Notifications | 3,250 Kb |
Love button | 3,597 Kb |
Pagination | 3,868 Kb |
Responsive color picker | 2,932 Kb |
Pure CSS read more toggle | 2,344 Kb |
Dropdown menu | 3,350 Kb |
Comments thread | 3,601 Kb |
DragToIncDec | 2,489 Kb |
2 CSS objects that will simplify your HTML structure | 4,136 Kb |
Flat radio buttons | 2,759 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 |
Cloud upload | Jaflo | 2,774 Kb |
404 Error Page | WebSonick | 3,203 Kb |
Isometric css island | Xaddict | 2,950 Kb |
Z-index demo | Kblh | 1,534 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
Guidepopup | Wooljs | 3,747 Kb |
RSW | JordanC | 3,726 Kb |
Sign Up Form | Sicontis | 5,272 Kb |
Force Counter | Kenlauguico | 2,732 Kb |
FreeCodeCamp - Simon Game | Ivhed | 8,481 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!