- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
报告包含 4 个表格。所有行应具有相同的高度。
我试过来自
的答案通过使用
.table td, .table th {
height: 63px;
}
但是,如果左表第二行有更多行,则将被忽略。我也尝试使用 !important 并设置 tr 高度,但它的高度仍然被忽略。
如何解决这个问题?使用 Bootstrap 3 和 jquery。
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-1.12.4.js" integrity="sha256-Qw82+bXyGq6MydymqBxNPYTaUXXq7c8v3CwiYwLLNXU=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<style type="text/css">
.table {
width: 100%;
margin-bottom: 0;
}
.table td, .table th, .table tr {
height: 72px;
white-space: normal;
word-break: break-all !important;
word-wrap: break-word !important;
}
.right td,
.right th {
width: 78px;
}
.left td,
.left th {
width: 78px;
}
.left,
.right {
float: left;
height: 450px;
box-sizing: border-box;
}
.lbody {
overflow-x: scroll;
overflow-y: hidden;
height: 400px;
}
.left .table,
.right .table {
table-layout: fixed;
}
.rbody {
overflow: scroll;
height: 400px;
}
.rheader,
.lheader {
overflow-x: hidden;
overflow-y: hidden;
}
.left {
width: 15%;
/*15%; */
}
.right {
width: 50%;
/*85%;*/
}
</style>
<script>
$(function() {
$(".lbody").on("scroll", function() {
$(".rbody").scrollTop($(this).scrollTop());
});
$(".rbody").on("scroll", function() {
$(".lbody").scrollTop($(this).scrollTop());
});
$(".rbody").on("scroll", function() {
$(".rheader").scrollLeft($(this).scrollLeft());
});
$(".lbody").on("scroll", function() {
$(".lheader").scrollLeft($(this).scrollLeft());
});
$('#rheader tr, #rbody tr').each(function() {
var tr = $(this);
var children = tr.children();
$(children[0]).hide();
$(children[1]).hide();
});
});
</script>
</head>
<body>
<div class="left">
<div class="lheader">
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Kuupäev</th>
<th>Märkused</th>
</tr>
</thead>
<tbody>
<tr>
<td>Viimane</td>
<td>hind</td>
</tr>
</tbody>
</table>
</div>
<div class="lbody">
<table class="table table-bordered table-striped table-condensed table-hover">
<tbody>
<tr>
<td>22.04.2016</td>
<td nowrap>Arve 22.04.2016,Tellimus 161813 22.04.2016</td>
</tr>
<tr>
<td>29.03.2016</td>
<td nowrap>Tellimus 161413 28.03.2016</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="right">
<div class="rheader">
<table class="table table-bordered table-striped table-condensed" id="rheader">
<thead>
<tr>
<th scope="col">
kuupaev
</th>
<th scope="col">
märkused
</th>
<th scope="col">
5B2
</th>
<th scope="col">
91in1
</th>
<th scope="col">
AutoGreaseWhite
</th>
<th scope="col">
BERBrake30L
</th>
<th scope="col">
BERceramic
</th>
<th scope="col">
BERhermeetik
</th>
<th scope="col">
BERhss19osa
</th>
<th scope="col">
BERklaasilapp
</th>
<th scope="col">
BERviimlapp
</th>
<th scope="col">
BERõlilapid50tk
</th>
<th scope="col">
BRNsoftLapp
</th>
<th scope="col">
Etch16ml
</th>
<th scope="col">
Heebel
</th>
<th scope="col">
HSS6.0
</th>
<th scope="col">
HSS8.0
</th>
<th scope="col">
HST12S
</th>
<th scope="col">
HSTClear12mm
</th>
<th scope="col">
KD-400
</th>
<th scope="col">
KENTseep3L
</th>
<th scope="col">
Laadija
</th>
<th scope="col">
LiimGel
</th>
<th scope="col">
LiimVedel
</th>
<th scope="col">
NAPFC
</th>
<th scope="col">
Piliiatslamp
</th>
<th scope="col">
PlazTex
</th>
<th scope="col">
PPDG
</th>
<th scope="col">
PSG-Skang
</th>
<th scope="col">
PTFE+
</th>
<th scope="col">
SDL
</th>
<th scope="col">
ShowrGlaz
</th>
<th scope="col">
SOS
</th>
<th scope="col">
Speedy500
</th>
<th scope="col">
SRA
</th>
<th scope="col">
SRP
</th>
<th scope="col">
SWG3
</th>
<th scope="col">
TyreDress
</th>
<th scope="col">
USBjuhe
</th>
<th scope="col">
Veljepuhasti
</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>Viimane hind</td>
<td>20,05000</td>
<td>8,50000</td>
<td>5,70000</td>
<td>60,00000</td>
<td>5,00000</td>
<td>8,35000</td>
<td>30,00000</td>
<td>1,60000</td>
<td>1,40000</td>
<td>25,00000</td>
<td>2,30000</td>
<td>4,50000</td>
<td>2,55000</td>
<td>5,60000</td>
<td>6,70000</td>
<td>9,31000</td>
<td>11,00000</td>
<td>4,30000</td>
<td>18,00000</td>
<td>4,50000</td>
<td>8,00000</td>
<td>7,50000</td>
<td>0,00000</td>
<td>0,00000</td>
<td>9,85000</td>
<td>9,30000</td>
<td>16,50000</td>
<td>9,15000</td>
<td>0,00000</td>
<td>21,35000</td>
<td>7,20000</td>
<td>11,70000</td>
<td>8,50000</td>
<td>0,00000</td>
<td>5,70000</td>
<td>7,55000</td>
<td>1,50000</td>
<td>19,00000</td>
</tr>
</tbody>
</table>
</div>
<div class="rbody">
<table class="table table-bordered table-striped table-condensed table-hover" id="rbody">
<tbody>
<tr>
<td>22.04.2016 0:00.00</td>
<td>Arve 22.04.2016,Tellimus 161813 22.04.2016</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>6,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>29.03.2016 0:00.00</td>
<td>Tellimus 161413 28.03.2016</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1,0000</td>
<td>4,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1,0000</td>
<td></td>
<td></td>
<td>1,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>3,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>28.03.2016 0:00.00</td>
<td>Arve 29.03.2016</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1,0000</td>
<td>4,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1,0000</td>
<td></td>
<td></td>
<td>1,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>3,0000</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
最佳答案
将 div 添加到每个 tds 并将内容放入 div 中以实现此...
.table td, .table th, .table tr,.table div{
height: 63px !important;
}
关于javascript - 如何将所有表格的表格行高设置为固定值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37896928/
我正在尝试实现 3 列固定-流体-固定布局。此外,布局的高度必须占据整个屏幕,使其看起来像从上到下的 3 个实心列。 总结: Left-column: fixed-width Center-col
我在网上搜索过,似乎找不到一个干净、简单、所有浏览器都友好的 3 列布局。 我希望有 3 列布局,左列固定为 200px,右列固定为 200px,中间列为剩余宽度,但最小宽度为 600px。所以整体最
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 8 年前。 Improve this q
我正在使用一些音频指纹技术来标记长录音中的歌曲。例如,在广播节目中的记录。指纹机制工作正常,但我在归一化(或下采样)方面遇到问题。 在这里您可以看到两首相同的歌曲,但波形不同。我知道我应该进行一些直流
为什么使用cout调用setprecision和fixed以及其他iomanip函数不像例如name.find('')plz这样的字符串函数 最佳答案 它们允许您以以下方式链接操作: cout <<
我正在尝试创建一个侧边栏,当用户向下滚动页面时,该侧边栏会跟随用户,并且我设法使用以下代码实现了效果: 标记 Javas
我正在尝试设置一些性能分析以及影响缓冲策略的运行时决策。我的应用程序收到一个指向由库(CUDA 或 OpenCL)分配的缓冲区的指针。 如何测试内存区域是否被页面锁定? 据我所知,POSIX 给了我们
我正在用 C# 编写一个 B+ 树实现,我为我的应用程序选择的树实现有一个非常特定的结构,它是缓存敏感的。为了实现这些属性,它对树节点有严格的布局策略。 我想要的只是使用 C# 的 fixed 来表达
我试图通过将 fragment 注入(inject)容器来在每个屏幕的底部放置一个广告 View 。通过使用 LinearLayout,我可以将 adview 置于操作栏下方的顶部。我已经尝试了 Re
我正在尝试创建一个导航稍微复杂的网站。我已经让导航看起来像我想要的初始加载,但现在我试图让它粘性导航到滚动顶部。我已经能够在导航栏到达顶部时创建一个类,但无法使其粘滞。每次我添加一个位置时,它都会跳回
首先,我正在寻找一个纯 CSS 解决方案。我可以使用 JavaScript 非常轻松地做到这一点,所以不要费心给我提示如何在 JS 中做到这一点。 我有一个包含 3 个容器的网页。其中 2 个是固定的
我猜这里有一种 super 特例。 我正在处理许多包含。现在我正在一个包含的内容文件中编码。我需要一个灯箱,它有一个 20% 的黑色背景覆盖整个页面,包括本身固定的标题,并在先前的 PHP 文件中设置
我正在尝试制作一个包含两个“固定”侧边栏图像和一个“固定”标题图像的页面。由于标题是固定的(距顶部 0 到 10%)。我不希望页眉图像与页面上的任何文本重叠。我尝试将段落标记定位为“相对”,并将其设置
我遇到了一个(水平)居中固定位置元素的解决方案,如下所示: element { width: 200px; position: fixed; left: 0; righ
我试图让我的网站主体具有固定的高度(我想!)。 无论如何,站点正文只是白色,边框大小为 1。基本上,正文的大小取决于其中的内容,例如,随着添加更多内容,它会自动调整大小。 我想要的是垂直滚动条,这样主
是否可以在 css 中创建 master-detail-states 布局? 我需要 3 个占位符: +---------------+-------+ | A | B
我的问题是,我是否必须在每个 Get/Post 请求之前单独请求检查 SSL Pinning OkHttpClient client = new OkHttpClient.Builder().cert
假设我有一个具有 N 个节点的常量(一旦构建就不会改变)平衡树,每个内部节点都有 p 个子节点。显然,访问节点的最坏情况是 logp(N)。但是访问 r 个节点的摊销成本呢?如果我们按升序访问它们(有
我知道会话固定是用php破解网站的方法。 会话固定是一种允许攻击者劫持有效用户会话的攻击 session fixation 但我不知道这可以防止我的项目中出现此问题。 是描述解决方案的方式或样本。 最
我在 jquery 砖石布局内有一个导航元素,我想将其修复到特定位置,比如右上角。是否可以这样做,以便所有其他元素都位于它周围? 诸如前置导航之类的东西.. 这是我的代码:http://jsfiddl
我是一名优秀的程序员,十分优秀!