本文介绍了五款符合标准的div+css制作的弹出菜单,而且不含有js的.
NO.1最基本的:二级dropdown弹出菜单
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> .menu { /* specific to non IE browsers */ </style> <style type="text/css"> /* Get rid of any default table style */ </style> <![endif]--> <body> <div class="menu"> <ul> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="index.html">MENUS</a> <!--[if lte IE 6]> <ul> </ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../layouts/index.html">LAYOUTS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../boxes/index.html">BOXES</a> <!--[if lte IE 6]> <ul> </ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../mozilla/index.html">MOZILLA</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../ie/index.html">EXPLORER</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../opacity/index.html">OPACITY</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <!-- clear the floats if required --> </div> |
NO.2 三级dropdown弹出菜单
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> .menu ul {padding:0; margin:0;list-style-type: none; } .menu ul li {float:left; margin-right:1px; position:relative;} .menu ul li ul {display: none;} /* specific to non IE browsers */ </style> .menu ul li a:hover {color:#fff; background:#36f;} </style> <body> <div class="menu"> <ul> <!--[if lte IE 6]> <ul> <li><a class="hide" href="../menu/hover_click.html" title="Hover/click with no active/focus borders">HOVER/CLICK ></a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></li> <!--[if lte IE 6]> </li> <li><a class="hide" href="index.html">MENUS</a> <!--[if lte IE 6]> <ul> </ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../layouts/index.html">LAYOUTS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../boxes/index.html">BOXES</a> <!--[if lte IE 6]> <ul> </ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../mozilla/index.html">MOZILLA</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../ie/index.html">EXPLORER</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../opacity/index.html">OPACITY</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> <ul class="left"> <!--[if lte IE 6]> </li> <!--[if lte IE 6]> </li> </div> </body> |
NO.3 flyout-竖向三级弹出菜单
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> /* specific to non IE browsers */ </style> .menu ul li a:hover {color:#fff; background:#36f;} </style> <body> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <!--[if lte IE 6]> </li> <li><a class="hide" href="index.html">MENUS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../layouts/index.html">LAYOUTS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../boxes/index.html">BOXES</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../mozilla/index.html">MOZILLA</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../ie/index.html">EXPLORER</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../opacity/index.html">OPACITY</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> </div> |
NO.4 dropline-水平三级横向弹出菜单
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> /* specific to non IE browsers */ </style> .menu ul li a.hide, .menu ul li a:visited.hide {display:none;}
</style> <body> <div class="menu"> <ul> <!--[if lte IE 6]> <ul> <li><a class="hide" href="../menu/hover_click.html" title="Hover/click with no active/focus borders">HOVER/CLICK</a> <!--[if lte IE 6]> <ul class="right_side"> <!--[if lte IE 6]> </li> <li><a href="../menu/shadow_boxing.html" title="Multi-position drop shadow">shadow boxing</a></li> <!--[if lte IE 6]> </li> <li><a class="hide" href="index.html">MENUS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../layouts/index.html">LAYOUTS</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../boxes/index.html">BOXES</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li> <li><a class="hide" href="../mozilla/index.html">MOZILLA</a> <!--[if lte IE 6]> <ul> <!--[if lte IE 6]> </li>
|

收藏到QQ书签