.现在我做一个像QQ空间日志那样的效果. 把过长的标题隐藏一部分. 当鼠标移到标题上时显示全部
请问要怎么做呢..? 谢谢...!

解决方案 »

  1.   

    譬如说你的标题在变量 $Title 里:<a title="<?php echo $Title ?>"><?php echo substr($Title,0,20) ?>...</a>
      

  2.   

    就这样,不过避免截取乱码问题可以使用mb_substr
      

  3.   

    你这样窃取了;不能在放上去 又全部显示了把这个得通过js来做;比如说这样
    <h1 onmousemove="hiddens('hidden');">这是标题<span id='hidden' style="display:none;">被隐藏的部分</span></h1>
    <script type="text/javascript" >
    function heddens(obj){
     document.getElementById(obj).style.display="";
    }
    </script>全手写不知有 错没;请楼主检查一下;呵呵