Jquery DataTable Horizo​​ntol滚动 [英] Jquery DataTable Horizontol Scroll

查看:131
本文介绍了Jquery DataTable Horizo​​ntol滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Jquery DataTable( http://datatables.net )。我尝试一些演示为Horizo​​ntol滚动条

Am using Jquery DataTable(http://datatables.net). Am trying with some demo for Horizontol Scroll bar

当我设置sScrollX属性。我的DataTable DOM就像下面一个

When i set the "sScrollX" property. My DataTable DOM is like below one

<div class="dataTables_scroll">
<div class="dataTables_scrollHead" style="overflow: hidden; position: relative; border: 0px none; width: 100%;">
<div class="dataTables_scrollBody" style="overflow: auto; width: 100%;">
<table id="resultsDatatable" class="dataTable" style="margin-left: 0px; width: 110%;" aria-describedby="resultsDatatable_info">
<thead>
<tbody>

在哪里可以获得多个Thead和我的UI是凌乱的。如果我删除一切都很好,但我不会得到Horizo​​ntol滚动

Where am getting Multiple Thead and my UI is messy. If i remove everything is fine but i wont get Horizontol scroll

什么是错误的?

推荐答案

你没有做错什么 - 当启用滚动功能时,DataTable必须将表分成两部分(只有在所有浏览器上执行此操作),并且保持列宽匹配,thead元素是重复。视觉上你根本看不到。您可以链接到显示问题的演示页吗?

You aren't doing anything wrong - DataTables has to split the table into two when scrolling is enabled (only way of doing it across all browsers), and to keep the column widths matched, the thead element is duplicated. Visually you should not see that at all. Can you link to a demo page showing the problem?

这篇关于Jquery DataTable Horizo​​ntol滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆