Answer the question
In order to leave comments, you need to log in
Is it possible to implement such an animation in pure CSS3, without JS?
and stripe.com (animation when you click on the USA flag icon) Have
you seen the source codes of such animations somewhere?
Answer the question
In order to leave comments, you need to log in
Here is the js + css3 skeleton , I hope you style it yourself:
Symphony/cb5mssd7/
Editing my answer, because many people care about this issue - I decided to do it in css.
Please new solution only css :
jsfiddle.net/Symphony/pqwhthsm
As a rule, each such feature is just a class switch. the rest will be done for you by transition or animation
1. in the case of a checkbox, you can simply write
input { clip чтобы скрыть базовый чекбокс }
input + label { лейбл }
input + label:before { стили чекбокса }
input ~ .dropdown { закрытый дропдаун }
input:checked + label:before { стили нажатого чекбокса }
input:checked ~ .dropdown { открытый дропдаун }
<input id="ch1" type="checkbox"
<label for="ch1"
<div class="dropdown"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question