我已经尝试了下面提到的一段代码,但它没有使其响应。任何人都可以对此代码进行修改以使其响应?如何在CSS中制作响应表
.content table {
border-collapse:collapse;
margin:0 0 1.625em;
width:100%;
font-size:90%
}
.content table h3 {
font-size:1em;
font-weight:300
}
.content tbody {
border-bottom:1px solid #444;
border-left:1px solid #444
}
.content tr:nth-child(odd) {
background-color:#eee
}
.content table th {
background-color:#0078d7;
color:#fff;
font-size:.85em
}
.content td,.content th {
vertical-align:top
}
.content th,.content td {
padding:3px 10px;
text-align:left;
border-top:1px solid #444;
border-right:1px solid #444
}
HTML
$menu .= '<table class="content"><thead><tr><th>Name</th><th>Description</th><th>Price</th></tr></thead>';
while (have_rows('sections_items')) : the_row();
// Your loop code
$menu .= '<tr><td>'.get_sub_field('dish_names').'</td><td>'.get_sub_field('dish_description').'</td><td>$ '.get_sub_field('dish_price').'</td></tr>';
endwhile;
$menu .= '</table> ';
发表您的HTML代码 – mlegg
它显示表,但没有反应 – raja
@raja你在寻找它,当你说“有求必应”做。并且可以将“呈现”html发布到您的原始问题 – happymacarts