我想删除<br />
's并通过CSS做断线。如果我将跨度更改为display:block
宽度将变为 100%,并且我需要宽度正好是文本的长度,就像现在一样。有什么建议么?
<div class="fullscreen">
<p class="text">
<span class="medium">We</span> <br />
<span class="large">build</span> <br />
<span class="medium">the</span> <br />
<span class="large">Internet</span>
</p>
</div>
.text span {
background:rgba(165, 220, 79, 0.8);
display:inline-block;
padding:7px 10px;
color:white;
}
.fullscreen .large { font-size:80px }