zoukankan      html  css  js  c++  java
  • 单元格变色和图片透明

    用单元格变色的方法来做网页导航,在网上可以经常看到,但代码有简有繁,如果运用样式表来实现,将可以节约很多代码,特别是当有很多行需用这种效果时: 

    1


     .aa
      { background-color:#aaa; color:#000 }
    .bb 
      { background-color:#ccc; color:#000 }

    <table width="200" border="0" cellspacing="1" cellpadding="0" >
    <tr>
    <td onmouseover="this.className='aa'" onmouseout="this.className='bb'" class="bb" >test </td>
    <td onmouseover="this.className='aa'" onmouseout="this.className='bb'" class="bb" > test</td>
    <td onmouseover="this.className='aa'" onmouseout="this.className='bb'" class="bb" > test</td>
    </tr>
    </table>
    2

    table#changecolor td a {
     100%;
     display:block;
     background-color:#ccc;
    }
    table#changecolor td a:hover {
     100%;
     background-color:#aaa;
    }

    <table id="changecolor" width="200" border="0" cellspacing="1" cellpadding="0" >
    <tr>
    <td ><a href="##">test</a>  </td>
    <td ><a href="##">test</a>  </td>
    <td ><a href="##">test</a>  </td>
    </tr>
    </table>

    图片透明

    <SCRIPT language=JavaScript1.2>
    <!--
    <!--
    function high(which2){
    theobject=which2
    highlighting=setInterval("highlightit(theobject)",30)
    }
    function low(which2){
    clearInterval(highlighting)
    which2.filters.alpha.opacity=100
    }
    function highlightit(cur2){
    if (cur2.filters.alpha.opacity>30)
    cur2.filters.alpha.opacity-=10
    else if (window.highlighting)
    clearInterval(highlighting)
    }

    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    }
    //-->
    </SCRIPT>

    <IMG
                onmouseover=high(this) style="FILTER: alpha(opacity=100)"
                onmouseout=low(this)
                src="m/menu1.gif"
            border=0>

  • 相关阅读:
    作业第十六周
    web、app、小程序测试异同点
    接口测试用例演进
    Python中“if __name__=='__main__':”
    iPhone发布内测程序的方法
    我的2020
    python 参数笔记 --> 位置参数 关键字参数 命名参数 形式参数 默认参数 可变参数 可选参数 位置顺序
    uwsgi 热部署 热启动 热更新
    Supervisor 进程管理工具 笔记
    spring Boot----注解驱动开发
  • 原文地址:https://www.cnblogs.com/zerogo/p/2209351.html
Copyright © 2011-2022 走看看