gpt4 book ai didi

javascript - Bootstrap 表在 Chrome 上无法正常工作,但在 Firefox 上可以正常工作

转载 作者:数据小太阳 更新时间:2023-10-29 04:06:07 26 4
gpt4 key购买 nike

我使用 Twitter Bootstrap 3 在模态内制作了一个表格。奇怪的是它在 Firefox 和 jsFiddle 上运行良好,但在 Google Chrome 上却不行。

<button class="btn btn-xs btn-default" data-toggle="modal" data-target="#competitor_modal">
Competitor
</button>

<div class="modal fade" id="competitor_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">&times;</span>
<span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="myModalLabel">Competitors</h4>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>URL</th>
<th>Final Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Comp Link</td>
<td>http://www.complink.com.ph/product_info.php?cPath=49_9&amp;products_id=7371</td>
<td>2790.00</td>
</tr>
<tr>
<td>2</td>
<td>Gigahertz</td>
<td>http://www.gigahertz.com.ph/products/accessories/headset/a4tech-hs-105</td>
<td>8695.00</td>
</tr>
<tr>
<td>3</td>
<td>SM Cyber Zone</td>
<td>http://www.smcyberzone.com/products/mobile-phones/acer/acer-liquid-s1</td>
<td>9800.00</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>

这是 jsFiddle:
http://jsfiddle.net/dsf496jw/3/

这里是一些屏幕截图。

Chrome : chrome screenshot

火狐: enter image description here

最佳答案

将此类添加到您的 <table>

.my-table {
table-layout: fixed;
word-wrap: break-word;
}

Updated jsfiddle

它适用于 mdlg屏幕虽然它不适合移动设备。

关于javascript - Bootstrap 表在 Chrome 上无法正常工作,但在 Firefox 上可以正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25355181/

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