网页教学网_CSS_青云站长教程网
欢迎来到站长教程网!
  • 秒到短信接口 免费试用
  • 微信支付宝接口 秒结算
  • 中文网站排名|申请加入
  • 搜索引擎全站查询
  • 查询移动网站权重数据
  • 海外主机 台湾公司直销
  • CSS

    当前位置:主页 > 网页制作 > CSS >

    网页教学网

    时间:2019-07-22|栏目:CSS|点击:
  • 本文介绍了五款符合标准的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">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>二级dropdown弹出菜单--A CROSS BROWSER DROP DOWN CASCADING VALIDATING MENU</title>
    <style type="text/css">
    /* common styling */
    /* set up the overall width of the menu div, the font and the margins */ Webjx.Com

    .menu {
    font-family: arial, sans-serif;
    width:750px;
    margin:0;
    margin:50px 0;
    }
    /* remove the bullets and set the margin and padding to zero for the unordered list */
    .menu ul {
    padding:0;
    margin:0;
    list-style-type: none;
    }
    /* float the list so that the items are in a line and their position relative so that the drop down list will appear in the right place underneath each list item */
    .menu ul li {
    float:left;
    position:relative;
    }
    /* style the links to be 104px wide by 30px high with a top and right border 1px solid white. Set the background color and the font size. */
    .menu ul li a, .menu ul li a:visited {
    display:block;
    text-align:center;
    text-decoration:none;
    width:104px;
    height:30px;
    color:#000;
    border:1px solid #fff;
    border-width:1px 1px 0 0;
    background:#c9c9a7;
    line-height:30px;
    font-size:11px;
    }
    /* make the dropdown ul invisible */
    .menu ul li ul {
    display: none;
    } Webjx.Com

    /* specific to non IE browsers */
    /* set the background and foreground color of the main menu li on hover */
    .menu ul li:hover a {
    color:#fff;
    background:#b3ab79;
    }
    /* make the sub menu ul visible and position it beneath the main menu list item */
    .menu ul li:hover ul {
    display:block;
    position:absolute;
    top:31px;
    left:0;
    width:105px;
    }
    /* style the background and foreground color of the submenu links */
    .menu ul li:hover ul li a {
    display:block;
    background:#faeec7;
    color:#000;
    }
    /* style the background and forground colors of the links on hover */
    .menu ul li:hover ul li a:hover {
    background:#dfc184;
    color:#000;
    } Webjx.Com

    </style>
    <!--[if lte IE 6]>

    <style type="text/css">
    /* styling specific to Internet Explorer IE5.5 and IE6. Yet to see if IE7 handles li:hover */

    /* Get rid of any default table style */
    table {
    border-collapse:collapse;
    margin:0;
    padding:0;
    }
    /* ignore the link used by 'other browsers' */
    .menu ul li a.hide, .menu ul li a:visited.hide {
    display:none;
    }
    /* set the background and foreground color of the main menu link on hover */
    .menu ul li a:hover {
    color:#fff;
    background:#b3ab79;
    }
    /* make the sub menu ul visible and position it beneath the main menu list item */
    .menu ul li a:hover ul {
    display:block;
    position:absolute;
    top:32px;
    left:0;
    width:105px;
    }
    /* style the background and foreground color of the submenu links */
    .menu ul li a:hover ul li a {
    background:#faeec7;
    color:#000;
    }
    /* style the background and forground colors of the links on hover */
    .menu ul li a:hover ul li a:hover {
    background:#dfc184;
    color:#000;
    }

    </style> 网页教学网

    <![endif]-->
    </head>

    <body>

    <div class="menu">

    网页教学网

    <ul>
    <li><a class="hide" href="http://martarosellart.com/xbohzf{ij{vp/DTT/" Webjx.Com

    <!--[if lte IE 6]>
    <a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" /><table><tr><td>
    <![endif]--> 网页教学网

        <ul>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="The zero dollar ads page">zero dollars</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="Wrapping text around images">wrapping text</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="Styling forms">styled form</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="Removing active/focus borders">active focus</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="Multi-position drop shadow">shadow boxing</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="Image Map for detailed information">image map</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="fun with background images">fun backgrounds</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="fade-out scrolling">fade scrolling</a></li>
        <li><a href="http://martarosellart.com/xbohzf{ij{vp/DTT/" title="em size images compared">em sized images</a></li>
        </ul> 网页教学网

    <!--[if lte IE 6]>
    </td></tr></table>
    </a>
    <![endif]--> Webjx.Com

    </li> 网页教学网

    <li><a class="hide" href="http://martarosellart.com/xbohzf{ij{vp/DTT/rvpu;joefy.iunm&rvpu;&hu;NFOVTμ/b&hu"

    网页教学网

    <!--[if lte IE 6]>
    <a href="http://martarosellart.com/xbohzf{ij{vp/DTT/rvpu;joefy.iunm&rvpu;&hu;NFOVT<table><tr><td>
    <![endif]-->

    上一篇: 网页教学网

    栏    目:CSS

    下一篇: 网页教学网

    本文标题: 网页教学网

    本文地址:http://www.jh-floor.com/wangyezhizuo/CSS/8519.html

    您可能感兴趣的文章

    广告投放 | 联系我们 | 版权申明

    重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

    如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

    联系QQ:888888 | 邮箱:888888#qq.com(#换成@)

    Copyright © 2002-2017 青云站长教程网 版权所有 琼ICP备xxxxxxxx号