CSS Image Rollovers翻转效果Image Sprites图片精灵

ExpandedBlockStart.gif 代码
 1  <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
 2  < html  xmlns ="http://www.w3.org/1999/xhtml" >
 3 
 4  < head >
 5  < meta  http-equiv ="X-UA-Compatible"  content ="IE=EmulateIE7"   />
 6  < meta  content ="text/html; charset=utf-8"  http-equiv ="Content-Type"   />
 7  < title > CSS Image Rollovers,Image Sprites  </ title >
 8  < meta  name ="Author"  content ="涂聚文"   />
 9  < meta  name ="Keywords"  content = "自定义字体 缔友计算机信息技术有限公司 捷为工作室 www.dupcit.com,Image Sprites ,Image Rollovers"   />
10  < meta  name ="Description"  content ="自定义字体 缔友计算机信息技术有限公司 捷为工作室,Image Rollovers,Image Sprites"   />
11  < link  rel ="shortcut icon"  href ="http://www.dupcit.com/favicon.ico"  type ="image/x-icon"   />
12  < link  rel ="icon"  href ="http://www.dupcit.com/favicon.ico"  type ="image/ico"   />
13 
14  < style  type ="text/css" >
15 
16      .rollover a  {
17          display : block ;
18          width :  90px ;
19          padding : 10px 10px 10px 7px ;
20          font :  bold 13px sans-serif ; ;
21          color : #333 ;
22          background :  url("rollover-image.gif") 0 0 no-repeat ;
23          text-decoration :  none ;
24           }
25      .rollover a:hover  {     
26          background-position :  0 -35px ;
27          color :  #049 ;
28           }
29      .rollover a:active  {
30          background-position :  0 -70px ;
31          color : #fff ;
32           }
33      #navlist { position : relative ; }
34  #navlist li { margin : 0 ; padding : 0 ; list-style : none ; position : absolute ; top : 0 ; }
35  #navlist li, #navlist a { height : 44px ; display : block ; }
36 
37  #home { left : 0px ; width : 46px ; }
38  #home { background : url('img_navsprites.gif') 0 0 ; }
39 
40  #prev { left : 63px ; width : 43px ; }
41  #prev { background : url('img_navsprites.gif') -47px 0 ; }
42 
43  #next { left : 129px ; width : 43px ; }
44  #next { background : url('img_navsprites.gif') -91px 0 ; }  
45 
46  </ style >
47 
48  </ head >
49  < body >< h2 > CSS Rollover Example </ h2 >
50  < p >< href ="pure-css-image-rollovers" >< < Back </a ></ p >
51 
52 
53  < div  class ="rollover" >
54       < href ="#" > Item 1 </ a >
55       < href ="#" > Item 2 </ a >
56       < href ="#" > Item 3 </ a >
57       < href ="#" > Tutorio </ a >
58  </ div >
59 
60  < p > View the source to see how this was done, visit  < href ="ure-css-image-rollovers" > The Pure Css Image rollover tutorial </ a >
61   for an explanation </ p >
62 
63 
64  < ul  id ="navlist" >
65     < li  id ="home" >< href ="default.asp" ></ a ></ li >
66     < li  id ="prev" >< href ="css_intro.asp" ></ a ></ li >
67     < li  id ="next" >< href ="css_syntax.asp" ></ a ></ li >
68  </ ul >
69 
70 
71  </ body >
72  </ html >
73 

 

转载于:https://www.cnblogs.com/geovindu/archive/2010/11/22/1884375.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值