直接用alt或title属性不就行了?

解决方案 »

  1.   


    <img src="" alt="提示" title="提示">
      

  2.   

    我听说可以用javascript+CSS来实现浮动效果
      

  3.   

    <body onclick="hidden();">
    <div id="div1" style="background-color:blue;width:130px;" onmouseover="show();" onmouseout="hidden();">把鼠标移上来看看</div>
    <br>
    <div id="div2" style="position:absolute;z-index:10;background-color:red;width:200px;height:100;display:none;">DIV2</div>
    </body>
    <script>
    function show(){
    var event=event||window.event;
    document.getElementById("div2").style.display="";
    document.getElementById("div2").style.left=event.clientX+"px";
    document.getElementById("div2").style.top=event.clientY+"px";
    }
    function hidden(){
    document.getElementById("div2").style.display="none";
    }
    </script>