zoukankan      html  css  js  c++  java
  • 鼠标移动到图片上时,显示大图片

    HTML标签中的一部分,仅供参考

    <tr>
    <td><input type="checkbox" class="checkbox1"/></td>
    <td>1002</td>
    <td>小猫咪</td>
    <td><img src="img/02.jpg" height="100" width="100" alt=""/></td>               //图片
    <td>200</td>
    <td><input type="button" value="添加"/></td>
    </tr>

    <img id="imgTip" class="clsImg" src="img/04.jpg" alt="" />    //写在外面,隐藏显示,定位提示图片的位置

    .clsImg{
    position:absolute;
    border:1px solid #ccc;
    200px;
    height:200px;
    display:none;

    }

    JS部分实现功能:

    <script type="text/javascript" src="../jquery-1.8.3.js"></script>
    <script type="text/javascript">
    $(function(){

     $("table tr:nth-child(odd)").css("background","#CCF");    //奇偶行变色

    var x=5; var y=15;
    $("table tr td img").mousemove(function(e) {
    $("#imgTip").attr("src",this.src).css({"top":(e.pageY+y)+"px","left":(e.pageX+x)+"px"}).show(600);
    });

    $("table tr td img").mouseout(function() {
    $("#imgTip").hide();
    });

    /*复选框单机事件*/

    $("#checkAll").click(function() {
    if(this.checked){
    $("table tr td input[type=checkbox]").attr("checked",true);
    }else
    {
    $("table tr td input[type=checkbox]").attr("checked",false);
    }
    });



    });
    </script>

  • 相关阅读:
    poj 1286 Necklace of Beads poj 2409 Let it Bead HDU 3923 Invoker <组合数学>
    大圣降妖录破解
    dex文件格式二
    dex文件格式一
    打造smali代码库辅助分析
    一键调试脚本使用手册
    TraceView进行性能分析
    Android Killer工具用法
    十三. JEB破解三
    十二. 一步步破解JEB 2.0demo版二
  • 原文地址:https://www.cnblogs.com/eyunhua/p/3714150.html
Copyright © 2011-2022 走看看