当我检查元素并将光标移动到任何特定的部分标签上时。 仅使用 height 0 突出显示主父div的顶部的section标记。没有显示实际的部分标记,它就像显示内联块。我只想知道为什么会这样。什么是使用节标记的正确方法。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<div class="col-md-12">
<section id="amenities-part">
<div class="col-md-6">
<h2>Amenities</h2>
<span>Lift</span> <br><span>AC</span>
</div>
</section>
<section id="services-part">
<div class="col-md-6">
<h2>Services</h2>
<span>Cooking</span> <br><span>Cooking</span>
</div>
</section>
<section id="safety-part">
<div class="col-md-6">
<h2>Safety</h2>
<span>First Aid Kit</span> <br><span>Fire Extinguisher </span>
</div>
</section>
<section id="local-service-part">
<div class="col-md-6">
<h2>Local Area Service</h2>
<span>jfh</span> <br><span>jfh</span>
</div>
</section>
<section id="handler-detail-part">
<div class="col-md-6">
<h2>Handler Detail</h2>
<img class="img-responsive" alt="Handler-profile-picture" width="75px" src="https://www.primomedico.com/wp-content/uploads/2015/09/Prof-Dr-Schmidli-Juerg-Spezialist-Gefaesschirurgie-Bern-Portrait_klein.jpg">
<p>Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper.</p>
</div>
</section>
</div>
&#13;
答案 0 :(得分:1)
Button
你也可以使用它简单
答案 1 :(得分:0)
HTML元素表示文档的通用部分,即内容的主题分组,通常带有标题。每个都应该被识别,通常包括标题( - 元素)作为元素的子元素。
以下是一个例子:
<强>之前强>
<div>
<h2>Heading</h2>
<img src="bird.jpg" alt="bird">
</div>
<强>后强>
<section>
<h2>Heading</h2>
<img src="bird.jpg" alt="bird">
</section>