【发布时间】:2022-11-13 18:19:46
【问题描述】:
我需要在阅读更多内容之前选择段落,以便我可以将高度扩展到段落的全高。我不知道如何使用 :focus 选择器来选择它
.main {
background: red;
}
button:focus **select the one div** {
background: pink;
}
<div class="main">
<div class="one"><p>This is a paragraph. Extra words, Bla Bla........</P></div>
<button>Read More<button>
</div>
【问题讨论】:
-
我刚刚添加了段落