资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
CSS/HTML教程
>>>
dl,dt,dd制作的CSS垂直菜单
感觉跟ul和li有点类似,不过也算是一种新思路,源码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>dl,dt,dd制作的CSS垂直菜单</title> <style type="text/css"> #menu dl {width: 150px; margin: 0 auto; padding: 0 0 10px 0; background: #69c url(file:///E|/ceshi/media/bottom.gif) no-repeat bottom left;} #menu dt {margin:0; padding: 10px; font-size: 1.4em; font-weight:bold; color: #fff; border-bottom:1px solid #fff; background: #69c url(file:///E|/ceshi/media/top.gif) no-repeat top left;} #menu dd {margin:0; padding:0; color: #fff; font-size: 1em; border-bottom:1px solid #fff; background: #47a;} #gallery a, #gallery a:visited {color:#fff; text-decoration:none; display:block; padding:5px 5px 5px 20px; background: #47a url(file:///E|/ceshi/media/arrow.gif) no-repeat 10px 10px; width:125px; } #gallery a:hover {background: #258 url(file:///E|/ceshi/media/arrowr.gif) no-repeat 11px 10px; color:#9cf;} ol li {font-size:11px;} </style> </head> <body> <div id="menu"> <dl id="gallery"> <dt>Gallery</dt> <dd><a href="#" _ewebeditor_ta_href="%23" title="Paul Cezanne">Paul Cezanne</a></dd> <dd><a href="#" _ewebeditor_ta_href="%23" title="Henri Matisse">Henri Matisse</a></dd> <dd><a href="#" _ewebeditor_ta_href="%23" title="Vincent van Gogh">Vincent van Gogh</a></dd> <dd><a href="#" _ewebeditor_ta_href="%23" title="William Turner">William Turner</a></dd> <dd><a href="#" _ewebeditor_ta_href="%23" title="John Constable">John Constable</a></dd> <dd><a href="#" _ewebeditor_ta_href="%23" title="Claude Monet">Claude Monet</a></dd> </dl> </div> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程