禁用表结构
我有一个使用大量嵌套表的综合 Web 应用程序。 这个应用程序适用于桌面版本/视图。
我正在为移动视图设置它。这几乎完成了,但是:
我正在使用 JSP 和 java 来检索搜索结果。所有这些一次显示在一行中。 我无法使这一行适合移动屏幕,所以我正在寻找一个 JavaScript 函数来禁用表结构,并仅显示彼此下方的列,例如 - 与 Opera mini MOBILE VIEW 相当,它具有单击按钮即可使内容适合任何屏幕尺寸。我的网络应用程序运行良好,但某些表格除外,例如搜索结果。我不想更改 JSP,也不想创建新页面 - 那样工作量太大了!
我想要的只是包含一个特定的 JavaScript 文件,如果连接的用户通过手持设备(可以工作)来并禁用表格,或者使其正确适合屏幕!
我希望有人能够想出一个解决方案,我已经尝试了 CSS 的所有内容,以及一些 JavaScript 位(我不太熟悉) 我有两个单独的 CSS 文件,根据您连接的介质,它会选择正确的一个。
但是如何摆脱表溢出/数据将显示良好,而不必在小型设备上左右滚动,据您所知,这非常烦人;)!?!?!?
此致 亚历克斯
I have a comprehensive web application with the use of lots of nested tables.
This app works fine for desktop version / view.
I am in the process of getting it setup for mobile view. Which is nearly done, BUT:
I am using JSP and java to, for example, retrieve search results. All of these are displayed in one row at a time.
I am not able to make this row fit onto a mobile screen, so what I am looking for is a JavaScript function to disable the table structer, and just show the columns underneath each other e.g. - comparable with opera mini MOBILE VIEW, which with the click of a button makes contect fit to any screen size. My web app works fine, except of some tables, such as search results. I do not want to change the JSP, not create new pages - that would be too much work !
All I want is to include a certain JavaScript file if the connected user comes via handheld device (which works) and disable the tables, or make it fit properly to the screen !!
I hope someone is able to come up with a solution, I have tried everything with CSS, and few JavaScript bits (which I am not so familiar with)
I have two seperate CSS files, depending on the medium u conenct with, it chooses the right one.
BUT HOW TO GET RID OF THE TABLE OVERFLOW / that the data will be displayed fine, without having to scroll left and right on a small device, which as u know is very annoying ;) !?!?!?
Best regards
ALEX
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试使用替代样式表:
...这应该允许单元格浮动在其父行内。
示例: http://jsfiddle.net/doktormolle/nu62m/
Try using an alternative stylesheet:
...this should allow cells to float inside their parent row.
Example: http://jsfiddle.net/doktormolle/nu62m/