【发布时间】:2022-02-11 20:29:31
【问题描述】:
我怎样才能做到这一点
到这里
调整浏览器大小时。 供您参考,这些是带有和弦的歌词行。我想在歌词上方实现完全相同的和弦固定位置以使其响应。我正在使用 HTML、CSS。 任何人,请帮忙。
.lines {
margin: 5px 0;
}
.lyrics,.notes {
font-family: 'Open Sans', sans-serif;
font-size: 16px;
color: rgb(45, 45, 45);
font-weight: 600;
}
.lines>span:first-child:after {
content: "\A";
white-space: pre-line;
}
.notes {
color: rgb(0, 150, 0);
background-color: rgb(241, 241, 241);
}
<div class="lines">
<span> <span class="notes">G</span> <span class="notes">Em</span></span>
<span class="lyrics">Well, I found a girl, beautiful and sweet</span>
</div>
<div class="lines">
<span> <span class="notes">C</span> <span class="notes">D</span></span>
<span class="lyrics">Oh, I never knew you were the someone waiting for me</span>
</div>
【问题讨论】:
-
您需要使用表格元素。我以前在这里做过这种东西……
-
请添加您迄今为止尝试过的内容(HTML 和 CSS)。
-
是的,我已经添加了 HTML 和 CSS
标签: html css media-queries responsive