我必须从pdf创建一个语义网页。一切都很好(一点也不好),但是我有一个脚注不适合固定的行高。我想将其放在p标签内,该标签可以正常工作,但我不知道这样是否很好。
这是代码:
.text {
padding-left: 8.5vw;
padding-right: 8.5vw;
padding-bottom: 10vw;
}
.text-column {
padding-top: 10vw;
column-count: 2;
column-gap: 4vw;
}
.text p {
color: #333;
margin-bottom: 2.7vw;
line-height: 3vw;
text-align: justify;
text-indent: 3vw;
font-size: 2.12vw;
}
.footnote hr {
background-color: #000;
width: 33%;
height: 0.2vw;
margin-top: 4vw;
margin-bottom: 1vw;
border-color: #000;
}
.footnote {
font-size: 1.36vw !important;
text-align: justify !important;
line-height: 1em !important;
}
<article class="text text-column">
...
<small class="footnote">
<hr>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi tempore nostrum laboriosam laborum sed nulla
quae libero distinctio consequuntur. Ut sint molestiae, placeat voluptatibus vitae repudiandae architecto nemo
et in?
</small>
</article>
答案 0 :(得分:3)
是。实际上,the MDN page for <small>
本身展示了嵌套在<small>
标签内的<p>
标签作为示例:
<p>This is the first sentence.
<small>This whole sentence is in small letters.</small>
</p>
<p>
是flow content元素,而<small>
是phrasing content元素。任何措辞内容都可以放入任何流内容中。除此之外,<small>
是inline element,因此不会中断内容流。
但是,请记住,<small>
的大小比页面上的默认文本大小小一号,因此您可能需要相应地进行调整。这可以通过嵌套<small>
<small>
来完成,因为<small>
也是<small>
本身的有效父代。请注意,有一个 等效项<big>
,尽管它被CSS'font-size
所取代。
答案 1 :(得分:0)
是的,根据官方文件也可以允许。 https://www.w3.org/MarkUp/html3/footnotes.html