在实际应用的时候,你会发现你的“感觉”是错的,它们之间真的有不同
不同之处在你看的文章里应该已经说明过了。
试试这个HTML结构,可以加深你的印象:
<article id="my_article" class="post">
<header class="post-header">
<h2 class="post-title">樱花园游记</h2>
<span class="author">云升</span> <a href="#" class="categories">日记</a> <time>2022-09-01</time>
</header>
<main class="post-content">
<h2>樱花园游记</h2>
<p>今天下午,我们一家去风景优美的樱花园游玩。</p>
<p>到了风景优美的樱花园,我和妹妹四处张望,欣赏着这娇嫩迷人的樱花。</p>
<img src="" alt="文章内的图片;请填写src属性">
</main>
<footer class="post-meta">
<time>2022-09-01</time> <span class="comments"><span class="comments-count">3</span>条评论</span>
</footer>
</article>
<article id="my_other_article" class="post">
<header class="post-header">
<h2 class="post-title">可爱小金鱼</h2>
<span class="author">云升</span> <a href="#" class="categories">日记</a> <time>2022-09-01</time>
</header>
<main class="post-content">
<p>我家养了五条可爱的小金鱼,两条黄色的,三条红色的。它们每天在水里欢快地游来游去,就象五条彩带在水中飘舞。</p>
<img src="" alt="文章内的图片;请填写src属性">
</main>
<footer class="post-meta">
<time>2022-09-01</time> <span class="comments"><span class="comments-count">5</span>条评论</span>
</footer>
</article>
试着做成这样(提示:边框是2px厚,article或者post的宽度是600px):
