gpt4 book ai didi

html - Bootstrap 表位置调整

转载 作者:行者123 更新时间:2023-11-28 05:36:34 25 4
gpt4 key购买 nike

我已经设法将表格的宽度和边距位置设置为 margin-left:-240px;我应该在调整窗口大小时将表格设置为 bootstrap 格式。但是,当我调整窗口大小时,表格位置似乎有点偏离它的位置。如何在不影响 bootstrap 格式的情况下将表格设置为 margin-left?

<div class="container">
<div class="row">
<div class="panel panel-primary filterable">
<div class="panel-heading">
<h3 class="panel-title">Hi there</h3>
</div>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr class="filters">
<th class="col-md-2"><input type="text" class="form-control" placeholder="Type" disabled></th>
<th class="col-md-2"><input type="text" class="form-control" placeholder="Course" disabled></th>
<th class="col-md-2"><input type="text" class="form-control" placeholder="Description" disabled></th>
<th class="col-md-1"><input type="text" class="form-control" placeholder="Credit" disabled></th>
<th class="col-md-2"><input type="text" class="form-control" placeholder="Hourly" disabled></th>
<th class="col-md-2"><input type="text" class="form-control" placeholder="Profile" disabled></th>
<th class="col-md-3"><input type="text" class="form-control" placeholder="Book" disabled></th>
</tr>
</thead>
<tbody>
<tr class="text-nowrap">
<td>3/8/2015</td>
<td>1:15 PM</td>
<td>Field 7</td>
<td>Commingles</td>
<td>Jello Shot Jockeys</td>
<td>Jello Shot Jockeys</td>
<td>Jello Shot Jockeys</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

mystyle.css

.filterable {
margin-top: 30px;
width:140%;
margin-left:-240px;
}
.filterable .panel-heading .pull-right {
margin-top: -90px;
}
.filterable .filters input[disabled] {
background-color: transparent;
border: none;
cursor: auto;
box-shadow: none;
padding: 0;
height: auto;
}
.filterable .filters input[disabled]::-webkit-input-placeholder {
color: black;
}
.filterable .filters input[disabled]::-moz-placeholder {
color: black;
}
.filterable .filters input[disabled]:-ms-input-placeholder {
color: black;
}

最佳答案

<div class="container-fluid">
---- navbar here ----
<div class="row" style="top:100px">

<!-- ----------- left margin ----------------- -->
<div class="col-md-2"></div>

<div class="col-md-10">
--- Your table here ---
</div>

<!-- ----------- right margin ---------------- -->
<div class="col-md-2"></div>
</div>
</div>

关于html - Bootstrap 表位置调整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38171667/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com