使用图片背景居中的做法

  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. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  6. <title>zh_cs</title>
  7. <meta name="keywords" content="" />
  8. <meta name="description" content="" />
  9. <style type="text/css">
  10. img{ border:0}
  11. body{margin:0 auto; font-size:12px; font-family:Arial, Helvetica, sans-serif; text-align:center;}
  12. .wrapper{width:1016px; margin:0 auto; background:url(images/body_bg.jpg) top center repeat-y;}
  13. .top{width:1000px; height:31px; background:url(images/top_bg.jpg); margin:0 auto;}
  14. .top ul{list-style:none; margin:0px 30px 0px 0px; padding:0px;overflow:auto;zoom:1;}
  15. .top ul li{float:right;list-style:none;}
  16. .top ul li a{display:block;width:100px;height:31px;text-indent:-9999px;background:url(images/lx.jpg) 0 center no-repeat;}
  17. .top ul li .sc{ background-image:url(images/sc.jpg)}

  18. </style>
  19. </head>

  20. <body>
  21. <div class="wrapper">
  22. <div class="top">
  23. <ul>
  24. <li><a href="#" class="sc">收藏本站</a></li>
  25. <li><a href="#" class="lx">联系我们</a></li>
  26. </ul>
  27. </div>
  28. </div>
  29. </body>
  30. </html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值