有背景颜色时文本是否可以重叠?
<span style="font-family: Roboto, sans-serif !important; font-weight: regular; color=black; background-color:#E0E0E0; padding: 5px; ">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation </span>
答案 0 :(得分:2)
这是由于span
的内联特性。给出一个行高以避免重叠
<span style="font-family: Roboto, sans-serif !important;
font-weight: regular; color=black; background-color:#c44dff;
padding: 5px;line-height:30px ">Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation </span><br><br>