【问题标题】:Bootstrap Table Column Issue引导表列问题
【发布时间】:2016-07-10 09:42:58
【问题描述】:

我需要关于 bootstrap 表 css 的帮助,所以当我在 Bootstrap 表中从 Jquery 创建列时,我遇到了一些问题。

我的专栏滑倒了。我不想这样。我在我的专栏中给出 css,所以专栏看起来像这样。 谁能帮我 ?

JQuery 代码

var Tablo=document.getElementById("tablo_icin2");
        var tbody=document.getElementById("MyTBody");
        json_obj= $.parseJSON(veri);
        for(var i in json_obj)
        {

            var Satir=document.createElement("tr");
            var Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(" "));
            Satir.appendChild(Stun);

            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.classList.add("sorting_1");
            Stun.appendChild(document.createTextNode(json_obj[i].KuryeNumarasi  ));
            Satir.appendChild(Stun);
            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(json_obj[i].TipId  ));
            Satir.appendChild(Stun);
            //Yeni Stun Ekliyoruzz

            Stun=document.createElement("td");
            Stun.appendChild(document.createTextNode(" "  ));
            Satir.appendChild(Stun);

            //Yeni Stun Ekliyoruzz
            //And More Table Rows in down.

HTML 代码;

<table id="tablo_icin2" class="table table-bordered  table-hover table-striped">

                <thead>
                <tr>
                  <th>
                    <span class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></span>
                  </th>
                  <th>Kurye&nbsp;Numara</th>
                  <th>Kurye&nbsp;Tipi</th>
                  <th>Kurye&nbsp;Resmi</th>
                  <th>Adı&nbsp;Soyadı</th>
                  <th>TC&nbsp;Numarası</th>
                  <th>Cinsiyeti</th>
                  <th>Doğum&nbsp;Tarihi</th>

                  <th>Açıklama</th>
                  <th>İşe&nbsp;Başlama&nbsp;Tarihi</th>
                  <th>İşten&nbsp;Ayrılma&nbsp;Tarihi</th>
                  <th>Kan&nbsp;grubu</th>
                  <th>Boyu</th>
                  <th>Kilo</th>
                  <th>Ayakkabı&nbsp;Numara</th>
                  <th>Prim&nbsp;Grubu</th>

                  <th>Durumu</th>
                  <th>Sabit&nbsp;Telefonu</th>
                  <th>GSM&nbsp;Telefonu</th>
                  <th>E-&nbsp;mail&nbsp;Adresi</th>
                  <th>Ev&nbsp;Adresi</th>
                  <th>Android&nbsp;Kullanıcı&nbsp;Adı</th>
                  <th>Android&nbsp;Kullanıcı&nbsp;Şifresi</th>
                  <th>Yakının&nbsp;Adı&nbsp;Soyadı</th>
                  <th>Tanıdık&nbsp;Telefon&nbsp;1</th>
                  <th>Tanıdık&nbsp;Telefon&nbsp;2</th>
                  <th>Tanıdık&nbsp;Adres</th> 
                </tr>
                </thead>
                <tbody id="MyTBody">

                </tbody></table>

【问题讨论】:

    标签: javascript jquery html twitter-bootstrap bootstrap-table


    【解决方案1】:

    您可以在这些特定单元格中添加一个带有空格 nowrap 的类

    .text-nowrap {
        white-space: nowrap;
    }
    

    【讨论】:

      猜你喜欢
      • 2012-09-05
      • 1970-01-01
      • 2014-07-15
      • 1970-01-01
      • 1970-01-01
      • 2016-09-16
      • 2016-02-14
      • 2015-10-22
      • 2017-07-05
      相关资源
      最近更新 更多