HTML5 reference说
The hr element represents a paragraph-level thematic break,e.g. a scene change in a story,or a transition to another topic within a section of a reference book.
这个描述对我来说还不够描述.我使用HTML文档中的hr元素作为分离内容的一种方式.它是否正确?
有没有人可以给出几个例子,何时使用它(除了所示的示例)以及何时使用CSS造型?
解决方法
当你有两个不同主题的段落时,使用它是适当的.
<p>Paragraph about domestic kittens</p> <p>Paragraph about kittens' favourite foods</p> <p>Paragraph about kittens' playfulness</p> <hr> <p>Paragraph about my day at work</p>
<img src="/img/kitten.jpg" alt="kitten playing with ball"> <img src="/img/kitten1.jpg" alt="kitten drinking milk"> <hr> <img src="/img/zebra.jpg" alt="zebras in the wild">