Rails 4 + Datatables:空表显示奇怪的双重文本

时间:2016-05-24 15:57:48

标签: css ruby-on-rails datatables

我的视图中有一个DataTable,当表空时会显示奇怪的显示。每隔一行看起来像一个偏移text-shadow,但我在css中看不到任何会这样做的东西?一旦表格中有一个附加列,这个问题也就消失了。

enter image description here

html (带有双文“当前体重”的第一行示例)

<tr class="profile-row odd" role="row" data-dt-row="0" style="height: 30px;">
    <td class="profile-header" data-dt-row="0" data-dt-column="0">
        Current Weight
    </td>
</tr>

CSS

element.style {
    height: 30px;
}
.profile-row {
    padding-bottom: .25em;
    text-align: center;
}

* {
    box-sizing: border-box;
}
user agent stylesheet
tr {
    display: table-row;
    vertical-align: inherit;
    border-color: inherit;
}
Inherited from table.profile-table-table.specialest.dataTable.no-footer.DTFC_Cloned
table {
    border-spacing: 1em 0;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
user agent stylesheet
table {
    display: table;
    border-collapse: separate;
    border-spacing: 2px;
    border-color: grey;
}
Inherited from body
body {
    background-color: #fff;
    color: black;
    font-family: 'open sans';
    font-size: 16px;
    font-weight: 300;
    line-height: 20px;
}
body {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
}
Inherited from html.js.flexbox.flexboxlegacy.canvas.canvastext.webgl.no-touch.geolocation.postmessage.websqldatabase.indexeddb.hashchange.history.draganddrop.websockets.rgba.hsla.multiplebgs.backgroundsize.borderimage.borderradius.boxshadow.textshadow.opacity.cssanimations.csscolumns.cssgradients.cssreflections.csstransforms.csstransforms3d.csstransitions.fontface.generatedcontent.video.audio.localstorage.sessionstorage.webworkers.applicationcache.svg.inlinesvg.smil.svgclippaths
html {
    font-size: 10px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
html {
    font-family: sans-serif;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}
Pseudo ::before element
*:before, *:after {
    box-sizing: border-box;
}
Pseudo ::after element
*:before, *:after {
    box-sizing: border-box;
}

...

element.style {
}
div.DTFC_RightBodyWrapper tbody tr:first-child th, div.DTFC_RightBodyWrapper tbody tr:first-child td, div.DTFC_LeftBodyWrapper tbody tr:first-child th, div.DTFC_LeftBodyWrapper tbody tr:first-child td {
    border-top: none;
}

table.dataTable td, table.dataTable th {
    box-sizing: content-box;
}
table.dataTable td {
    white-space: nowrap;
}
table.dataTable td, table.dataTable th {
    box-sizing: content-box;
}
.profile-header {
    font-weight: bold;
    padding-right: 1em;
    padding-bottom: .25em;
    text-align: right;
}
p, ol, ul, td {
    font-family: 'open sans';
    font-size: 1em;
    line-height: 1.4em;
    -webkit-padding-start: 0;
}
td, th {
    padding: 0;
}
* {
    box-sizing: border-box;
}
user agent stylesheet
td, th {
    display: table-cell;
    vertical-align: inherit;
}
Inherited from tr.profile-row.odd
.profile-row {
    padding-bottom: .25em;
    text-align: center;
}
Inherited from table.profile-table-table.specialest.dataTable.no-footer.DTFC_Cloned
table {
    border-spacing: 1em 0;
}
table {
    border-collapse: collapse;
    border-spacing: 0;
}
user agent stylesheet
table {
    display: table;
    border-collapse: separate;
    border-spacing: 2px;
    border-color: grey;
}
Inherited from body
body {
    background-color: #fff;
    color: black;
    font-family: 'open sans';
    font-size: 16px;
    font-weight: 300;
    line-height: 20px;
}
body {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #fff;
}
Inherited from html.js.flexbox.flexboxlegacy.canvas.canvastext.webgl.no-touch.geolocation.postmessage.websqldatabase.indexeddb.hashchange.history.draganddrop.websockets.rgba.hsla.multiplebgs.backgroundsize.borderimage.borderradius.boxshadow.textshadow.opacity.cssanimations.csscolumns.cssgradients.cssreflections.csstransforms.csstransforms3d.csstransitions.fontface.generatedcontent.video.audio.localstorage.sessionstorage.webworkers.applicationcache.svg.inlinesvg.smil.svgclippaths
html {
    font-size: 10px;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
html {
    font-family: sans-serif;
    -ms-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}
Pseudo ::before element
*:before, *:after {
    box-sizing: border-box;
}
Pseudo ::after element
*:before, *:after {
    box-sizing: border-box;
}

0 个答案:

没有答案