• 单元格变色和图片透明


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

    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>

  • 相关阅读:
    教你如何让数据库支持emoji表情符存储
    PHP下载远程图片的3个方法
    CentOS7安装使用MySQL
    记录几个项目管理软件
    C++和C在linux下 和在windows下有什么区别?
    nginx配置location总结及rewrite规则写法
    A记录和CNAME记录的区别
    Nginx配置https的wordpress站点,wp-content目录下资源404解决方案
    清除chrome浏览器HSTS缓存
    面向对象基础----封装数据库操作类
  • 原文地址:https://www.cnblogs.com/zerogo/p/2209351.html
Copyright © 2020-2023  润新知