In the Web page we often can see, some pictures in the mouse through the time, there is a bottom or left or right sliding effect, very practical page is very convenient, today just use, take to share with you, there is nothing wrong or comments welcome correction.
The HTML section is as follows, which was intended to be used with JQ, which was not used later.
Words don't say much directly on the code.
<! DOCTYPE html>
<meta charset= "Utf-8";
<title>css Sprite (CSS Sprite) and CSS3 transition effects integrated application </title>
<link rel= "stylesheet" type= "Text/css" href= "Css/style.css"/>
< !--<script src= ". /.. /jquery v1.4.2/jquery-1.4.2.js "type=" Text/javascript "charset=" Utf-8 "></SCRIPT>-->
<script src= "Js/style.js" type= "Text/javascript" charset= "Utf-8" ></SCRIPT>
<body>
< Div class= "SideBar",
<ul class= "Sidebar_u",
<li><a class= "Sidebar_g gbm1" href= "javascript: ;" ></a></li>
<li><a class= "Sidebar_g gbm2" href= "javascript:;" ></a></li>
<li><a class= "Sidebar_g gbm3" href= "javascript:;" ></a></li>
<li><a class= "Sidebar_g gbm4" href= "javascript:;" ></a></li>
</ul>
</div>
</body>
CSS Section
li,ul{margin:0;padding:0}
Li{list-style-type:none}
A{text-decoration:none}
Body{background: #183741}
. sidebar{float:left;margin:0;padding:0}
. Sidebar_u{float:left;background: #112F35}
. SideBar ul li{height:63px;width:276px;margin:0 0 5px 0}
. SideBar ul Li A{height:62px;width:276px;display:block}
. Sidebar_g{background:url (.. /img/linkbtn.png);-webkit-transition-property:background-position;-webkit-transition-duration:.5s;- Moz-transition-property:background-position;-moz-transition-duration:.5s;transition-property: Background-position;transition-duration:.5s}
A.gbm1{background-position:0 -224px}
A.gbm1:hover{background-position:0 -288px}
A.GBM2{BACKGROUND-POSITION:-276PX-224PX}
A.GBM2:HOVER{BACKGROUND-POSITION:-276PX-288PX}
A.GBM3{BACKGROUND-POSITION:-552PX-224PX}
A.GBM3:HOVER{BACKGROUND-POSITION:-552PX-288PX}
A.GBM4{BACKGROUND-POSITION:-828PX-224PX}
A.GBM4:HOVER{BACKGROUND-POSITION:-828PX-288PX}
With the picture you want to show, and background positioning, a practical aesthetic effect is written.
Attached link http://xf.wolade.com/demo2/demo2/
CSS Sprite (CSS sprites) and CSS3 transition effects integrated Application