<style>
.switch { ... }
.switch .ball { ... }
#example1:checked ~ .switch .ball { left:84px; }
</style>
<input type="checkbox" id="example1"> <label for="example1"><span class="ball"></span></label>
<style>
.switch { ... }
.switch .ball { ... }
#example1:checked ~ .switch .ball { left:84px; }
</style>
<input type="checkbox" id="example1"> <label for="example1"><span class="ball"></span></label>
<style>
.example2 .buttons, .example2 .numbers { ... }
.example2 .numbers { ... }
.example2 .buttons .button, .example2 .numbers .number { display:none }
#example2_1:checked ~ div .button2_1, #example2_2:checked ~ div .button2_2, #example2_3:checked ~ div .button2_3,
#example2_1:checked ~ div .number2_1, #example2_2:checked ~ div .number2_2, #example2_3:checked ~ div .number2_3 { display:inline-block }
</style>
<input type="radio" name="example2" id="example2_1" checked>
<input type="radio" name="example2" id="example2_2">
<input type="radio" name="example2" id="example2_3">
<div class="numbers">
<div class="number number2_1">1</div><div class="number number2_2">2</div><div class="number number2_3">3</div>
</div>
<div class="buttons">
<label for="example2_2" class="button button2_1 click">Add one</label><label for="example2_3" class="button button2_2 click">Add one</label><label for="example2_1" class="button button2_3 click">Start again</label>
</div>
ux/campaign goal | type |
---|---|
inform | caroussel, magazine, accordion, popup |
explore | popup, parallax, zoomable content, hover |
profile/feedback | switches, rating, poll, form |
decision | quiz, widget |
conversion | shopping cart, configurator |
engage | game |
<style>
.slide .airlines .hotspot:before { /* hotspot pulse animation */
animation:pulse 3s ease-in-out infinite;
}
@keyframes pulse { ... }
.slide .airlines .popup { /* popups by default scale 0 (=invisible) and transition is on with fancy easing */
transform:scale(0) translate(-50%,-50%);
transition:all 0.3s cubic-bezier(0.76, 0, 0.24, 1);
}
#pilot0:checked ~ div .hotspot { /* hotspots only visible when nothing's open */
transform:scale(1);
}
#pilot1:checked ~ div .popup1, #pilot2:checked ~ div .popup2, #pilot3:checked ~ div .popup3, #pilot4:checked ~ div .popup4 {
transform:scale(1) translate(-50%, -50%);
} /* open each popup with scale transition */
</style>
<input type="radio" name="pilot" id="pilot0" checked>
<input type="radio" name="pilot" id="pilot1">
<input type="radio" name="pilot" id="pilot2">
<input type="radio" name="pilot" id="pilot3">
<input type="radio" name="pilot" id="pilot4">
<style>
#profile1_no:checked ~ div .profile1,
...
#profile4_no:checked ~ div .profile4 {
transform:rotate(-20deg) translateX(-100%);
opacity:0;
}
#profile1_yes:checked ~ div .profile1,
...
#profile4_yes:checked ~ div .profile4 {
transform:rotate(20deg) translateX(100%);
opacity:0;
}
</style>
<input type="radio" name="profile1" id="profile1_vote" checked>
<input type="radio" name="profile1" id="profile1_yes" class="p1">
<input type="radio" name="profile1" id="profile1_no" class="p1">
<input type="radio" name="profile2" id="profile2_vote" checked>
...
<style>
#bottle2_6:checked ~ div .ballposition2 .animation {
--width:150%;
--height:150%;
}
@keyframes bottle_hit_translate { /* also keyframes for rotate */
15% {
transform: translate(calc(var(--fallx)*0.15),-25%);
}
40% {
transform: translate(calc(var(--fallx)*0.40),calc(var(--fally)*0.40));
}
100% {
transform: translate(var(--fallx),var(--fally));
}
}
</style>
<input type="radio" name="try1" class="try1 bottle1_gone" id="bottle1_1">
<input type="radio" name="try1" class="try1 bottle2_gone" id="bottle1_2">
...
<input type="radio" name="try2" class="try2 bottle1_gone" id="bottle2_1">
<input type="radio" name="try2" class="try2 bottle2_gone" id="bottle2_2">
...
any of a checkbox group? |
|
default "0" checked radio for start |
|
choice 2 and up (radio) |
|
combination of clicks |
|
random order w/ switching labels |
|
<div style="background-image:url(http://linkhere);display:none" class="pixel1"></div>