论坛风格切换
正版合作和侵权请联系 sd173@foxmail.com
 
  • 帖子
  • 日志
  • 用户
  • 版块
  • 群组
帖子
购买邀请后未收到邀请联系sdbeta@qq.com
  • 1354阅读
  • 1回复

[求助-系统问题]网页特效代码:纯css下拉菜单列表 [复制链接]

上一主题 下一主题
离线风晨
 

发帖
2652
今日发帖
最后登录
2018-03-03
只看楼主 倒序阅读 使用道具 楼主  发表于: 2009-10-29 14:06:27

纯css下拉菜单列表,无hack,无IE判断,无table,无JS。测试浏览器   IE6、IE7、IE8、FF3.0

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh">
  3. <head profile="http://www.w3.org/2000/08/w3c-synd/#">
  4. <meta http-equiv="content-language" content="zh-cn" />
  5. <meta http-equiv="content-type" content="text/html;charset=gb2312" />
  6. <style type="text/css">
  7. /* ================================================================
  8. This copyright notice must be untouched at all times.
  9. The original version of this stylesheet and the associated (x)html
  10. is available at http://www.cssplay.co.uk/menus/dl-clickslide.html
  11. Copyright (c) 2005-2009 Stu Nicholls. All rights reserved.
  12. This stylesheet and the associated (x)html may be modified in any
  13. way to fit your requirements.
  14. =================================================================== */
  15. a, a:visited, a:hover, a:active, a:focus {}
  16. #positioner {position:relative; width:160px; height:160px; margin-left:10px;z-index:100;}
  17. #holder {position:absolute; width:150px; overflow:hidden; border:4px solid #000; border-width:4px 4px 3px 4px; background:#000;}
  18. dl.menu {width:300px; float:left; margin:-32700px -150px 0 0; background:url(http://www.webjx.com/files/091028/1_174457.gif) no-repeat left bottom; margin-bottom:2px;}
  19. dl.menu a {display:block; height:30px; color:#000; font:bold 11px/28px verdana, sans-serif; text-decoration:none;}
  20. dl.menu dt {float:left; padding:0; margin:32700px 0 0 0; position:relative; z-index:50;}
  21. dl.menu dt a.lefta {width:105px; float:left; padding-left:25px;}
  22. dl.menu dt a.plusa {width:20px; float:left; background:url(http://www.webjx.com/files/091028/1_174419.gif) no-repeat center center;}
  23. dl.menu dt a.plusa b {position:absolute; left:-9999px;}
  24. dl.menu dt a.lefta:hover,
  25. dl.menu dt a.lefta:focus,
  26. dl.menu dt a.lefta:active {color:#c00;}
  27. dl.menu dt a.plusa:hover {background:url(http://www.webjx.com/files/091028/1_174313.gif) no-repeat center center;}
  28. dl.menu dt a.plusa:focus,
  29. dl.menu dt a.plusa:active
  30. {margin-right:1px; background:url(http://www.webjx.com/files/091028/1_174313.gif) no-repeat center center; outline:0; position:relative; left:-9999px;}
  31. dl.menu dd {float:left; padding:30px 0 0 0; margin:-30px 0 0 0; position:relative; z-index:10; background:url(http://www.webjx.com/files/091028/1_174217.gif) no-repeat left top;}
  32. dl.menu dd a {background:#fff; width:125px; padding:5px 0 5px 25px; border-bottom:1px solid #ccc; font-weight:normal; line-height:17px; height:auto;}
  33. dl.menu dd a:hover,
  34. dl.menu dd a:focus,
  35. dl.menu dd a:active
  36. {margin-right:1px; color:#c00; outline:0;}
  37. </style>
  38. </head>
  39. <body>
  40. <div id="positioner">
  41. <div id="holder">
  42. <dl class="menu">
  43. <dt>
  44. <a class="lefta" href="#link">Home</a>
  45. </dt>
  46. </dl>
  47. <dl class="menu">
  48. <dt>
  49. <a class="lefta" href="#link">Products</a>
  50. <a class="plusa" href="#url"><b>+</b></a>
  51. </dt>
  52. <dd>
  53. <a href="#url">Digital Cameras</a>
  54. <a href="#url">Monopods & Tripods</a>
  55. <a href="#url">Flashguns & Reflectors</a>
  56. <a href="#url">Telephoto Lenses</a>
  57. <a href="#url">Filters</a>
  58. <a href="#url">Lens Hoods</a>
  59. <a href="#url">Lens Adaptors</a>
  60. </dd>
  61. </dl>
  62. <dl class="menu">
  63. <dt>
  64. <a class="lefta" href="#link">Services</a>
  65. <a class="plusa" href="#url"><b>+</b></a>
  66. </dt>
  67. <dd>
  68. <a href="#url">Enlarging</a>
  69. <a href="#url">Framing & Restoring</a>
  70. <a href="#url">Printing</a>
  71. <a href="#url">Copying</a>
  72. <a href="#url">Sepia Toning</a>
  73. <a href="#url">Archiving</a>
  74. </dd>
  75. </dl>
  76. <dl class="menu">
  77. <dt>
  78. <a class="lefta" href="#link">Outlets</a>
  79. <a class="plusa" href="#url"><b>+</b></a>
  80. </dt>
  81. <dd>
  82. <a href="#url">London</a>
  83. <a href="#url">Gloucestershire</a>
  84. <a href="#url">East Midlands</a>
  85. <a href="#url">Glasgow</a>
  86. <a href="#url">Bristol</a>
  87. <a href="#url">Exeter</a>
  88. </dd>
  89. </dl>
  90. <dl class="menu">
  91. <dt>
  92. <a class="lefta" href="#link">Terms</a>
  93. <a class="plusa" href="#url"><b>+</b></a>
  94. </dt>
  95. <dd>
  96. <a href="#url">Payment Methods</a>
  97. <a href="#url">Conditions of Sale</a>
  98. <a href="#url">Privacy Policy</a>
  99. </dd>
  100. </dl>
  101. </div>
  102. </div>
  103. </body>
  104. </html>

1条评分
quen2008 电魂 +3 闪电联盟因你而精彩! 2009-10-29
离线quen2008
发帖
*
今日发帖
最后登录
1970-01-01
只看该作者 沙发  发表于: 2009-10-29 15:58:18
这个不错的资源,弄网页制作的可以收藏了