• css省略号效果


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
        <title>New Document </title>
        <style>
            .ctl
            {
                table-layout: fixed;
            }
            .xx
            {
                text-overflow: ellipsis;
                overflow: hidden;
                white-space: nowrap;
                padding: 2px;
            }
            
            .ellipsis {50%;text-overflow:ellipsis; }/*just for ie*/
            ul
    {
        padding: 0px;
        margin: 0px;
        list-style: none;padding-left:10px;
        
        
    }
            li{
            
            
            90%;     
    white-space:nowrap;     
    text-overflow:ellipsis;     
    -o-text-overflow:ellipsis;     
    overflow: hidden;      
            }
            
        </style>
    </head>
    <body>

    <div style="80%;border:1px solid red">
    <ul>
            <li><span>1</span><span class="ellipsis">小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;</span></li>
            <li><span>1</span>小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;</li>
            <li><span>1</span>小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;</li>
            <li><span>1</span>小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;</li>
        </ul>
        </div>
        <table cellspacing="0" cellpadding="1" width="100%" class="ctl" border="1">
            <tbody>
                <tr>
                    <td class="xx">
                        <a href="#"><font>小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;</font></a>
                    </td>
                    <td style="60px">
                        (1/1)
                    </td>
                </tr>
                <tr>
                    <td>
                        小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;
                    </td>
                    <td>
                        (1/1)
                    </td>
                </tr>
                <tr>
                    <td>
                        小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;
                    </td>
                    <td>
                        (1/1)
                    </td>
                </tr>
                <tr>
                    <td>
                        小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;小王童鞋是大坏蛋;
                    </td>
                    <td>
                        (1/1)
                    </td>
                </tr>
            </tbody>
        </table>
    </body>
    </html>
  • 相关阅读:
    我参与的新书发布了
    发现一篇好文章《麻省理工学院(MIT)研究生学习指导—— 怎样做研究生》
    vpc、安全组和网络acl
    颠覆虚拟机的大神——WSL来了
    windows安装cuda和cudnn
    window10下pytorch解决不能使用多进程问题
    人脸对齐
    json在线解析
    pytorch whl下载
    【数据库】redis安装
  • 原文地址:https://www.cnblogs.com/yuanxiaoping_21cn_com/p/2297933.html
Copyright © 2020-2023  润新知