table td 文字显示两行,并且以…结尾,在360兼容模式不兼容解决方案。

来源:互联网 发布:sybase恢复数据库 编辑:程序博客网 时间:2024/05/16 14:10

table td 文字显示两行,并且以…结尾,在360兼容模式不兼容解决方案。
这是一个div里面包括table。

<div style="margin-left: -16px;width:850px;">                                    <table class="right-table" id="tableT" border="0" style="margin-bottom:-1px;width:850px;" cellspacing="0" cellpadding="0">                                        <stw:if test="${empty array }">                                                                        <tr align="center" >                                                <td class="text-grey"><span  style="color:#666666;">暂无模板</span></td>                                            </tr>                                        </stw:if>                                        <stw:if test="${not empty array }">                                            <stw:for items="${array}" var="array1" varStatus="array1Status">                                            <stw:if test="${array1Status.index<10 }">                                            <tr>                                                                                           <td onclick="Model('${array1.templateId}')" class="text-gray ruguo"><p id="${array1.templateId}">${array1.modelContent}</p></td>                                            </tr>                                            </stw:if>                                            </stw:for>                                        </stw:if>                                    </table>  </div>  .ruguo{             *display:inline-block;*             height: 50px;             width: 850px;             word-break: break-all;             display: -webkit-box;             -webkit-line-clamp: 2;             -webkit-box-orient: vertical;             overflow: hidden;             text-overflow: ellipsis;             border-bottom:1px #DDD solid;        }        .ruguo p{             margin-top:-9px;             text-align: left;             cursor: pointer;             line-height:22px;        }

如果没有带*标签代码,在除360兼容模式,IE,都可以正常显示,但在360兼容模式和IE不能达到效果。
加上带*标签,在ie,360兼容模式也可以达到效果,但是没有…,如果非要…,可以使用绝对定位把…定到想要的位置。
效果图:
这里写图片描述
这里写图片描述