1

我正在使用 JQuery slimScroll 插件在 div 中制作自定义滚动条。在那个 div 里面我有一个表格,我想让表格行的第一个和最后一个四舍五入,并且它可以在除 IE 8 之外的其他浏览器中正常工作。在 IE 8 中,当我滚动时,第一个和最后一个移动得慢一些。

我也附上了图片。在此处输入图像描述

这是表格:

<table>
    <c:forEach var="lists" items="${viewGroupListByUser}" varStatus="status">
    <tr style="position: relative;">
        <td ><img alt="" src="../images/group/group.jpg" style="margin-left: 10px;"></td>
        <td id="gn_${lists.groupID}" width="245px" style="padding-left: 10px !important;">${lists.groupName}</td>
        <td id="gd_${lists.groupID}"  width="190px">${lists.groupDetail}</td>
        <td width="120px"><a href="viewGroupPage?groupID=${lists.groupID}&groupName=${lists.groupName}" class="link_button">View</a></td>
        <td width="120px"><a href="#" onclick="showEditGroup(this)" id="${lists.groupID}" class="link_button">Edit</a></td>
        <td width="120px" class='last-child' style="position: relative;"><a href="deleteGroup/${lists.groupID}" class="link_button">Delete</a></td>
    </tr>
    </c:forEach>
</table>

这是CSS:

.group_manage_list_main{
    margin-left: 89px;
    margin-top: 10px;
    overflow-y: auto;
    width: 860px;
    height: 450px;
    position: relative;
}
.group_manage_list_main table{
    border-collapse: separate;
    width: 830px;
    border-spacing: 0 15px;
    margin-top: -14px;
    position: relative;
}
.last-child { 
    border-radius: 0 10px 10px 0;
    border:1px solid #FFFFFF;
    background: #FFFFFF;
    position: relative;
    behavior: url("../css/PIEFiles/PIE.htc");
}

请有人帮助我,我被困在这里两天了。谢谢

4

1 回答 1

1

那是因为是一个在 IE8 中不支持的 css3 属性

这是 w3schools 的参考资料

Mozilla 开发者参考

“更新”

您正在使用 Css3 选择器,并且在 IE8 中使用 jquery 也不支持您可以使用像这样的选择器

$(".group_manage_list_main td:last") //not tested

最后一个孩子 w3 学校文件

于 2013-05-15T03:58:51.917 回答