Html 如何向AD添加边框?
我正在用flask和bootstrap进行我的项目 问题是,滚动的文本像素出现在AD上方。如下图所示 所以我想通过给thead添加边框或使thead比表行厚来隐藏它 以下是我的html代码(由于代码太长,我几乎跳过了,并截图): 可滚动表格和可点击行的css代码:Html 如何向AD添加边框?,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我正在用flask和bootstrap进行我的项目 问题是,滚动的文本像素出现在AD上方。如下图所示 所以我想通过给thead添加边框或使thead比表行厚来隐藏它 以下是我的html代码(由于代码太长,我几乎跳过了,并截图): 可滚动表格和可点击行的css代码: .tableFixHead { overflow-y: auto; height: 400px; } .tableFixHead thead th { position: sticky; top: 0; } t
.tableFixHead { overflow-y: auto; height: 400px; }
.tableFixHead thead th { position: sticky; top: 0; }
table { border-collapse: collapse; height: 400px; width: 100%; }
th { padding: 8px 16px; }
th { background:#eee; }
td tr { padding: 0;}
tbody { height: 400px; width: 100%;}
.clickable-row {
cursor: pointer;
}
我该怎么办
++)添加了我的html代码
<div class="tableFixHead">
<table class="table table-bordered table-sm table-hover">
<thead>
<tr class="thead-light border">
<th>위치</th>
<th>퀘스트 이름</th>
<th>난이도</th>
</tr>
</thead>
<tbody>
{% if quest_list %}
{% for quest in quest_list %}
<tr class="clickable-row">
<td>{{ quest.location }}</td>
<td>{{ quest.name }}</td>
<td align="center">{{ quest.difficulty }}</td>
</tr>
{% endfor %}
{% else %}
<p>퀘스트 목록을 불러올 수 없습니다.</p>
{% endif %}
</tbody>
</table>
</div>
위치
퀘스트 이름
난이도
{%if quest_list%}
{任务列表%中的任务百分比}
{{quest.location}
{{quest.name}
{{quest.diffusion}}
{%endfor%}
{%else%}
퀘스트 목록을 불러올 수 없습니다.
{%endif%}
尝试在th
上添加上边框,使其保持粘性位置,但看起来更厚
thead th {
// use same background color to give illusion of no actual border
border-top: 20px solid #eee;
// if you want symmetry add
border-bottom: 20px solid #eee;
}
尝试向
th
添加上边框,使其保持粘性位置,但看起来更厚
thead th {
// use same background color to give illusion of no actual border
border-top: 20px solid #eee;
// if you want symmetry add
border-bottom: 20px solid #eee;
}
.床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头固定式床头{ 边框:5px实心#eee;
}.table固定床头和床头{ 边框:5px实心#eee;
}嘿,添加代码你有图像,请添加代码also@Aahad我添加了我的html代码,你也可以重置coordonates
。tableFixHead thead{位置:sticky;top:-1px;}
@G-Cyrillus ohh它起作用了。非常感谢你!嘿,添加代码你有图像,添加代码吗also@Aahad我添加了我的html代码,你也可以重置coordonates。tableFixHead thead{位置:sticky;top:-1px;}
@G-Cyrillus ohh它起作用了。非常感谢你!谢谢你的帮助。但边框顶部和边框底部会随着滚动而移动。有办法修复和thead的边界吗?我不知道。可能尝试重新定位td
,而不是使th
变厚。类似于tbody td{position:relative;top:10px;}
感谢您的帮助。但边框顶部和边框底部会随着滚动而移动。有办法修复和thead的边界吗?我不知道。可能尝试重新定位td
,而不是使th
变厚。类似于tbody td{position:relative;top:10px;}