zoukankan      html  css  js  c++  java
  • 黑白图变成彩色图的css导航

    <!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>
    <title>黑白图变成彩色图的css导航_网页代码站(www.webdm.cn)</title>
    <style type="text/css">
    #menu
    {position:relative; width:300px; height:300px; background:transparent url(http://www.webdm.cn/images/20090910/menu_bw.jpg);

    overflow
    :hidden; margin:0 auto;}
    #menu ul
    {margin:0; padding:0;}
    #menu li
    {list-style-type:none; width:100px; height:100px; display:inline;}
    #menu a
    {display:block; float:left; width:100px; height:0; overflow:hidden; color:#000; text-decoration:none; padding-top:100px;

    background
    :transparent url(http://www.webdm.cn/images/20090910/menu_col.jpg) no-repeat 500px 500px;}
    * html #menu a
    {height:100px; he\ight:0;}
    #menu a#item1:hover
    {background-position: 0 0; z-index:50;}
    #menu a#item2:hover
    {background-position: -100px 0; z-index:50;}
    #menu a#item3:hover
    {background-position: -200px 0; z-index:50;}
    #menu a#item4:hover
    {background-position: 0 -100px; z-index:50;}
    #menu a#item5:hover
    {background-position: -100px -100px; z-index:50;}
    #menu a#item6:hover
    {background-position: -200px -100px; z-index:50;}
    #menu a#item7:hover
    {background-position: 0 -200px; z-index:50;}
    #menu a#item8:hover
    {background-position: -100px -200px; z-index:50;}
    #menu a#item9:hover
    {background-position: -200px -200px; z-index:50;}
    </style>
    </head>
    <body>

    <div id="menu">
    <ul>
    <li><a id="item1" href="#" title="Item 1">Item 1</a></li>
    <li><a id="item2" href="#" title="Item 2">Item 2</a></li>
    <li><a id="item3" href="#" title="Item 3">Item 3</a></li>
    <li><a id="item4" href="#" title="Item 4">Item 4</a></li>
    <li><a id="item5" href="#" title="Item 5">Item 5</a></li>
    <li><a id="item6" href="#" title="Item 6">Item 6</a></li>
    <li><a id="item7" href="#" title="Item 7">Item 7</a></li>
    <li><a id="item8" href="#" title="Item 8">Item 8</a></li>
    <li><a id="item9" href="#" title="Item 9">Item 9</a></li>
    </ul>
    </div>
    </body>
    </html>
    <br>
    <a href="http://www.webdm.cn">网页代码站</a> - 最专业的代码下载网站 - 致力为中国站长提供有质量的代码!

    文章来自:http://www.webdm.cn/webcode/2e87e209-b8dc-44c6-8946-9f2eb90e9dbe.html

  • 相关阅读:
    BZOJ 3811: 玛里苟斯 线性基
    HDU 3949 XOR 线性基
    BZOJ 2115: [Wc2011] Xor 线性基 dfs
    BZOJ 3963 HDU3842 [WF2011]MachineWorks cdq分治 斜率优化 dp
    BZOJ 3262: 陌上花开 cdq分治 树状数组
    BZOJ 2653: middle 主席树 二分
    BZOJ 3524 [Poi2014]Couriers 主席树
    BZOJ 4826: [Hnoi2017]影魔 单调栈 主席树
    BZOJ 3956: Count 主席树 可持久化线段树 单调栈
    2018/4/9省选模拟赛 0分
  • 原文地址:https://www.cnblogs.com/webdm/p/1931698.html
Copyright © 2011-2022 走看看