CSS3 Analog Implementation of iphone back button effect:
You know now CSS3 can achieve a variety of beautiful effect, previously only pictures can achieve the effect, now CSS3 implementation of the difficulty is not too high.
Below to share a section of the use of CSS3 implementation of the iphone return button effect, in fact, this CSS3 code does not have to analyze, as long as the code example, you can fully understand, of course, you have to know the function of the various properties, the code is as follows:
<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title></Head><style>Body{margin:0;}Header{background:-moz-linear-gradient (Top, #65bbce, #50b1c8);background:-webkit-linear-gradient (Top, #65bbce, #50b1c8);background:-ms-linear-gradient (Top, #65bbce, #50b1c8);Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= ' #65bbce ', endcolorstr= ' #50b1c8 ', gradienttype= ' 0 ') ;Border-bottom:1px solid #348da7;Height:50px;Verflow:Hidden;}. Btn-back{Font:14px/27px Arial,helvetica,sans-serif;Color:#fff;text-decoration:None;position:relative;Display:Block;float: Left;margin:11px 0 0 10px;}. Btn-back span{Display:Inline-block;font-size:13px;Line-height:27px;Height:27px;padding:0 10px 0 5px;background:-moz-linear-gradient (Top, #5bbfd8, #449fb6);background:-webkit-linear-gradient (Top, #5bbfd8, #449fb6);background:-ms-linear-gradient (Top, #5bbfd8, #449fb6);Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= ' #5bbfd8 ', endcolorstr= ' #449fb6 ', gradienttype= ' 0 ') ;Border:1px solid #2c96b2;Border-left:0;Border-radius:2px 5px 5px 2px;Text-shadow:0-1px 0 rgba (0, 0, 0,. 4);Margin-left:12px;position:relative;Z-index:2;Box-shadow:0 1px 0 rgba (255, 255, 255,. 3) inset, 1px 1px 1px rgba (255, 255, 255,. 2);}. Btn-back:before{content:"';Display:Inline-block;width:20px;Height:20px;background:-moz-linear-gradient ( -45deg, #5bbfd8, #449fb6);/*Background Rotation -45°*/background:-webkit-linear-gradient ( -45deg, #5bbfd8, #449fb6);background:-ms-linear-gradient ( -45deg, #5bbfd8, #449fb6);Border:1px solid #2c96b2;-webkit-transform-origin:0 0;/*set base point to 0,0*/-moz-transform-origin:0 0;-ms-transform-origin:0 0;-webkit-transform:ScaleX (0.8) Rotate (45deg);/*X-axis smoke lock, swivel 45 °*/-moz-transform:ScaleX (0.8) Rotate (45deg);-ms-transform:ScaleX (0.8) Rotate (45deg);Border-radius:3px 2px;position:Absolute; Left:13px;Top:-1px;}</style><Body><Header><aclass= "Btn-back"href="#"> <span>Home</span></a></Header></Body></HTML>
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=17471
For more information, refer to: http://www.softwhy.com/divcss/
CSS3 Simulation for iphone back button effect