CSS css2.0 in the background-position have you ever used it? How to use it? Where is it used? JS Control picture Switch has two defects: 1. Sometimes after the switch slowly, need to preload to solve; 2. To make 2-3 sets of pictures
See how to solve this problem with background-position, realize fast "switch", here only use a picture
The FONT:10PX/1 in the code is also an uncommon usage.
can refer to here: http://www.w3.org/Style/CSS/Test/CSS1/current/sec5526c.htm
The effect of this usage on the site map or navigation bar:
<style type= "Text/css" > #menu a {display:block;width:150px;margin:6px; padding:10px 0 10px 32PX;FONT:10PX/1 Sans-serif;color: #f90; Background:url ("Btn.gif") top left No-repeat;text-decoration:none;} #menu a:hover {background-position:0 -39px;color:red;} #menu a:active {background:url ("btn.gif") 0-78px No-repeat;color:black;} </style></pead><body><div id= "menu" ><a href= "###" >menu link 1</a><a href= "# # # ">menu link 2</a><a href=" ### ">menu link 3</a><a href=" ### ">menu link 4</a><a href = "###" >menu link 5</a></div>
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]