第二个div被包含在第一个div中,即使它们不同并且flex box不起作用


<section class="third-part">
<div class="first">
<h2>PHILOSOPHY</h2>
<p>Following the ideas of the Old Academy, Zeno divided philosophy into three parts: logic (a wide subject including rhetoric, grammar, and the theories of perception and thought); physics (not just science, but the divine nature of the universe as well); and ethics, the end goal of which was to achieve eudaimonia through the right way of living according to Nature. 
<br> <br>In his treatment of Logic, Zeno was influenced by Stilpo and the other Megarians. Zeno urged the need to lay down a basis for Logic because the wise person must know how to avoid deception, Cicero accused Zeno of being inferior to his into the comprehensible and the incomprehensible, permitting for free-will the power of assent (sinkatathesis/συνκατάθεσις) in distinguishing between sense impressions.
</p>
<div>
<div class="statue">
<img src="https://i.postimg.cc/sx21rnDB/Image-2-2x.png
"class="statue" alt="statue of him">
</div>


我想要一个一边有标题和文本,另一边有图片的部分。因此,我创建了一个部分,其中有两个div,第一个有标题和段落,第二个有图片,然后在css中显示为flex。但它没有起作用。当我检查它时,它显示第二个div只包含在第一个div中。

所以,我有两个问题

  1. 为什么第二个div包含在第一个div中
  2. 如何使柔性箱工作

唯一做错的是没有关闭第一个div,这就是为什么在第一个div中获得第二个div的原因。

关上你的门就可以了。

<div class="first">
<h2>PHILOSOPHY</h2>
<p>Following the ideas of the Old Academy, Zeno divided philosophy into three parts: logic (a wide subject including rhetoric, grammar, and the theories of perception and thought); physics (not just science, but the divine nature of the universe as well); and ethics, the end goal of which was to achieve eudaimonia through the right way of living according to Nature. 
<br> <br>In his treatment of Logic, Zeno was influenced by Stilpo and the other Megarians. Zeno urged the need to lay down a basis for Logic because the wise person must know how to avoid deception, Cicero accused Zeno of being inferior to his into the comprehensible and the incomprehensible, permitting for free-will the power of assent (sinkatathesis/συνκατάθεσις) in distinguishing between sense impressions.
</p>
<div>

<div class="first">
<h2>PHILOSOPHY</h2>
<p>Following the ideas of the Old Academy, Zeno divided philosophy into three parts: logic (a wide subject including rhetoric, grammar, and the theories of perception and thought); physics (not just science, but the divine nature of the universe as well); and ethics, the end goal of which was to achieve eudaimonia through the right way of living according to Nature. 
<br> <br>In his treatment of Logic, Zeno was influenced by Stilpo and the other Megarians. Zeno urged the need to lay down a basis for Logic because the wise person must know how to avoid deception, Cicero accused Zeno of being inferior to his into the comprehensible and the incomprehensible, permitting for free-will the power of assent (sinkatathesis/συνκατάθεσις) in distinguishing between sense impressions.
</p>
</div>

希望这能有所帮助!

最新更新