zoukankan      html  css  js  c++  java
  • html 标题太长,使其后边用省略号代替

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
      <title> new document </title>
      <meta name="generator" content="editplus" />
      <meta name="author" content="" />
      <meta name="keywords" content="" />
      <meta name="description" content="" />
     </head>
    
     <body>
    <p style="overflow: hidden; 
    text-overflow: ellipsis; 
     150px;
    white-space:nowrap;">
    简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文简体中文
    </p>
    <p>关键在于:text-overflow: ellipsis;<br>
    
    这种方式支持IE6+,Chrome浏览器,切记要和overview:hidden; white-space: nowrap;一起使用。</p>
     </body>
    </html>
  • 相关阅读:
    第五次团队作业
    第三次个人作业
    第一次编程作业
    自我介绍
    个人总结
    第三次个人作业
    第一次结对作业
    第二次作业
    第一次博客作业
    Alpha总结
  • 原文地址:https://www.cnblogs.com/wangrongjie/p/2746516.html
Copyright © 2011-2022 走看看