简体   繁体   English

HTML 中的宽表

[英]Wide Tables in HTML

I'd like to display an overview of the access rights to some resources in a table on a webpage, with the resources as columns and users as rows.我想在网页上的表格中显示对某些资源的访问权限的概述,资源为列,用户为行。 The cells are green or red if the user has access to the resource or not.如果用户有权访问资源,则单元格为绿色或红色。 The cells contain no other data than the color and therefore can be very small.这些单元格除了颜色不包含其他数据,因此可以非常小。

在此处输入图片说明

I have no problem with many rows, but as there are more and more resources, the table gets very wide, as the title of the resource can be around 30 characters long.我对很多行没有问题,但是随着资源越来越多,表格变得非常宽,因为资源的标题可以长约 30 个字符。

What general approach would you choose?你会选择什么通用方法? Try to rotate the header row with nasty CSS hacks or something else?尝试使用讨厌的 CSS 技巧或其他方法来旋转标题行?

Use:用:

.vertical-text {
    transform: rotate(90deg);
    transform-origin: left top 0;
}

I wouldn't take this aproach.我不会采用这种方法。 I think is more usefull if you put a form with two drop lists one with items and the other one with employees and check it manually.我认为如果您放置一个带有两个下拉列表的表单,一个带有项目,另一个带有员工并手动检查它会更有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM