【问题标题】:Responsive table of bootstrap showing blur in mobile view在移动视图中显示模糊的引导响应表
【发布时间】:2019-07-17 19:56:38
【问题描述】:

我正在使用 Bootstrap 3.3.7。当我对表格使用“表格响应”类时,它在桌面视图中清晰而正确地显示,但在移动视图中,它显示模糊文本。文字显示不清晰。

<div class="table-responsive">
  <table class="table"> 
    <tr>
        <th> Sr.No </th>
        <th> Company Name </th>
        <th> Contact No. </th>
        <th> Address </th>                                    
    </tr>
    <tr>
        <th> 1 </th>
        <th> ABC </th>
        <th> 1234567890 </th>
        <th> India </th>                                    
    </tr>       
    <tr>
        <th> 2 </th>
        <th> XYZ </th>
        <th> 0123456789 </th>
        <th> India </th>                                    
    </tr>                   
  </table>
</div>

我想要,它在移动设备中显示表格的清晰视图,就像桌面视图一样。

【问题讨论】:

    标签: html css twitter-bootstrap-3 laravel-5.7


    【解决方案1】:

    .table-responsive {
        min-height: .01%;
        overflow-x: auto;
        border: 0px !important;
    }
    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width">
      <title>JS Bin</title>
      <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
    </head>
    <body>
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="table-responsive">
            <table class="table"> 
              <tr>
                <th> Sr.No </th>
                <th> Company Name </th>
                <th> Contact No. </th>
                <th> Address </th>                                    
              </tr>
              <tr>
                <th> 1 </th>
                <th> ABC </th>
                <th> 1234567890 </th>
                <th> India </th>                                    
              </tr>       
              <tr>
                <th> 2 </th>
                <th> XYZ </th>
                <th> 0123456789 </th>
                <th> India </th>                                    
              </tr>                   
            </table>
          </div>
        </div>
      </div>
    </div>
    </body>
    </html>

    我不确定它看起来模糊的确切原因,但是当我删除边框形式 .table-responsive 时它起作用了。

    【讨论】:

    • 不客气!如果您认为它有帮助或足够技术性,请批准并投票,以便其他成员可以从您的问题中受益:)
    • 嗨@nazifa rashid,我投了票,但它显示的信息是:“感谢您的反馈!声望少于 15 人的投票将被记录,但不会更改公开显示的帖子得分。”我的声望只有 11。
    • 好的,不用担心!如果您想批准并投票,请随意!
    • 嗨@nazifa rashid,我现在只有 16 个声望,所以我现在可以投票了。我投票赞成你的答案。谢谢你帮助我。
    • 不客气 :) 此外,由于您是新手,您还可以通过单击对勾来批准最佳答案
    猜你喜欢
    • 1970-01-01
    • 2017-02-07
    • 2018-07-28
    • 2021-01-17
    • 2017-03-05
    • 2013-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多