CSS3 stereo smart phone switch, webpage switch cool effect, css3 cool
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<Html xmlns = "http://www.w3.org/1999/xhtml">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Title> CSS3 stereo switch </title>
<Script>
Var snd = new Audio ('');
Document. addEventListener ('change', function (e ){
If(e.tar get. parentNode. className. indexOf ('checkboxcontrol ')! =-1 ){
Snd. currentTime = 0;
Snd. play ();
}
});
</Script>
<Style>
* {Margin: 0; padding: 0 ;}
Html, body {height: 100% ;}
Body {font: 15px/1 arial; text-align: center; background: # 509DAD ;}
Body: before {content: ''; display: inline-block; height: 100%; vertical-align: middle ;}
Fieldset {display: inline-block; vertical-align: middle; border: none; width: 370px ;}
. Legend {color: rgba (0, 0 ,. 7); font-size: 12px; margin-bottom: 14px; height: 15px; border-color: #2E6677; border-style: solid; border-width: 1px 1px 0 1px; box-shadow: 1px 1px 0 rgba (255,255,255, 0.2) inset; text-shadow: 0 1px rgba (255,255,255 ,. 3 );}
. Legend span {text-transform: uppercase; position: relative; top:-5px; padding: 0 10px; background: # 509DAD; display: inline-block ;}
. CheckboxGroup {display: inline-block; vertical-align: middle; width: 150px; border: none ;}
. CheckboxControl {
Border: 2px solid #102838; border-radius: 7px; display: inline-block; width: 100px; height: 50px; padding-top: 1px; position: relative; vertical-align: middle; margin: 0 60px 10px 0; color: #297597;
Box-shadow: 0 0 5px rgba (255,255,255 ,. 4), 0 2px 1px-1px rgba (255,255,255 ,. 7) inset, 8px 0 5px-5px # 02425C inset,-8px 0 5px-5px # 02425C inset;-moz-user-select: none;-webkit-user-select: none; background: #80DCE9;
}
. CheckboxControl input {position: absolute; visibility: hidden ;}
. CheckboxControl> div {
Background:-webkit-linear-gradient (left, #8FD9E4 0%, # A0F2FE 53%, #69DCF1 56%, #33 AFCE 99%, # CEF5FF 100% );
Background: linear-gradient (to right, #8FD9E4 0%, # A0F2FE 53%, #69DCF1 56%, #33 AFCE 99%, # CEF5FF 100% );
Box-shadow:-2px 0 1px 0 # A6F2FE inset;
Border-radius: 5px; line-height: 50px; font-weight: bold; cursor: pointer; position: relative; z-index: 1; text-shadow: 0 1px rgba (255,255,255, 0.5 );
Transform-origin: 0 0;-webkit-transform-origin: 0 0;
Transform: scaleX (0.93);-webkit-transform: scaleX (0.93 );
Transition:. 1 s;-webkit-transfer: 0.1 s;
}
. CheckboxControl div: first-letter {letter-spacing: 55px ;}
. CheckboxControl: checked ~ Div {
Transform-origin: 100% 0;-webkit-transform-origin: 100% 0;
Box-shadow: 2px 0 1px 0 # A6F2FE inset;
Background:-webkit-linear-gradient (left, # CEF5FF 0%, #33 AFCE 1%, #69DCF1 47%, # A0F2FE 50%, #8FD9E4 100% );
Background: linear-gradient (to right, # CEF5FF 0%, #33 AFCE 1%, #69DCF1 47%, # A0F2FE 50%, #8FD9E4 100% );
}
. CheckboxControl> B {position: absolute; bottom: 0; right: 0; width: 50%; height: 100%; border-radius: 8px;-webkit-transform: skewY (5deg ); transform: skewY (5deg); box-shadow: 0 6px 8px-5px #000 ;}
. CheckboxControl: checked ~ B {right: auto; left: 0;-webkit-transform: skewY (-5deg); transform: skewY (-5deg );}
. CheckboxControl. indicator {position: absolute; top: 14px; right:-20px; width: 8px; height: 25px; box-shadow: 0 0 8px #000 inset; border: 1px solid rgba (255,255,255, 0.1); border-radius: 15px; transition: 0.2 s;-webkit-transition: 0.2 s ;}
. CheckboxControl. indicator: before {content: ''; display: inline-block; margin-top: 8px; width: 2px; height: 8px; border-radius: 10px; transition: 0.5 s; -webkit-transition: 0.5 s ;}
. CheckboxControl: checked ~ . Indicator: before {box-shadow: 0 0 7px 6px # BAFC58; width: 6px; background: # F0F9E3; transition: 0.1 s;-webkit-transition: 0.1 s ;}
. CheckboxControl2 {
Border: 2px solid #102838; border-radius: 7px; display: inline-block; vertical-align: middle; font-weight: bold;
Width: 60px; height: 100px; position: relative; margin: 0 5px;
Color: # 12678C; box-shadow: 0 0 5px rgba (255,255,255,. 4 );
}
. CheckboxControl2 input {position: absolute; visibility: hidden ;}
. CheckboxControl2> div {
Background:-webkit-linear-gradient (top, #002B44 0%, # 0690AC 11%, # 038EAA 14%, # A0F2FE 58%, #91DBE7 96%, # B9E8E8 100% );
Background: linear-gradient (to bottom, #002B44 0%, # 0690AC 11%, # 038EAA 14%, # A0F2FE 58%, #91DBE7 96%, # B9E8E8 100% );
Height: 100%; border-radius: 5px; line-height: 50px; font-we0 0 3px 0px # F95757 inset, 0 0 12px 6px # F95757tion: relative; z-index: 1; cursor: pointer; text-shadow: 0 1px rgba (255,255,255, 0.5 );
}
. CheckboxControl2> div: after {
Content: 'watermark'; display: block; height: 50%; line-height: 4;
Transform-origin: 0 0;-webkit-transform-origin: 0 0;
}
. CheckboxControl2> div: before {
Content: 'watermark'; display: block; height: 50%; line-height: 2.5;
Border-radius: 80%/5px;
Box-shadow: 0 8px 12px-13px #89 DFED inset, 0-2px 2px-1px rgba (255,255,255, 0.8 );
Transform-origin: 0 100%;-webkit-transform-origin: 0 100%;
Transform: scaleY (0.7);-webkit-transform: scaleY (0.7 );
}
. CheckboxControl2: checked ~ Div {
Background:-webkit-linear-gradient (bottom, #002B44 0%, # 0690AC 11%, # 038EAA 14%, # A0F2FE 58%, #91DBE7 96%, # B9E8E8 100% );
Background: linear-gradient (to top, #002B44 0%, # 0690AC 11%, # 038EAA 14%, # A0F2FE 58%, #91DBE7 96%, # B9E8E8 100% );
}
. CheckboxControl2: checked ~ Div: before {
Border-radius: 0; box-shadow: none;
Transform: none;-webkit-transform: none;
}
. CheckboxControl2: checked ~ Div: after {
Border-radius: 80%/5px;
Box-shadow: 0-8px 12px-5px #89 DFED inset, 0 2px 2px 0 # 0690AC;
Transform: scaleY (0.7);-webkit-transform: scaleY (0.7 );
}
. CheckboxControl2. indicator {position: absolute; top:-20px; left: 17px; width: 25px; height: 8px; box-shadow: 0 0 8px #000 inset; border: 1px solid rgba (255,255,255, 0.1); border-radius: 15px; transition: 0.2 s;-webkit-transition: 0.2 s ;}
. CheckboxControl2. indicator: before {content: ''; display: block; margin: 2px auto; width: 8px; height: 5px; border-radius: 10px; transition: 0.5 s; -webkit-transition: 0.5 s ;}
. CheckboxControl2: checked ~ . Indicator: before {box-shadow: 0 0 2px 0px # F95757 inset, 0 0 12px 6px # F95757; background: # FFF; transition: 0.1 s;-webkit-transition: 0.1 s ;}
</Style>
</Head>
<Body>
<Div> http://www.999jiujiu.com/</div>
<Fieldset>
<Div class = 'gend'> <span> power switchs </span> </div>
<Div class = 'checkboxgroup'>
<Label class = 'checkboxcontrol'>
<Input type = 'checkbox'/>
<Div> alert policies </div> <B> </B>
<Span class = 'indicator'> </span>
</Label>
<Label class = 'checkboxcontrol'>
<Input type = 'checkbox'/>
<Div> alert policies </div> <B> </B>
<Span class = 'indicator'> </span>
</Label>
</Div>
<Label class = 'checkboxcontrol2 '>
<Input type = 'checkbox'/>
<Div> </div>
<Span class = 'indicator'> </span>
</Label>
<Label class = 'checkboxcontrol2 '>
<Input type = 'checkbox'/>
<Div> </div>
<Span class = 'indicator'> </span>
</Label>
</Fieldset>
</Body>
</Html>