我有一个高光跨度,我想坐在to之后,而不会影响父对象的宽度.我不想使用绝对定位.是否可以将该跨度与TO示例对齐并使父级溢出 示例:
Thank you for
your interest
to Sign up to today's deals
.outter {
width: 100%;
height: 100%;
}
.parent {
width: 260px;
border: 1px solid #ccc;
overflow: visible;
font-size: 45px;
line-height: 60px;
}
.overflowing-span {
white-space: nowrap;
display: inline-block;
}
.highlight {
padding: 8px;
background-color: gray;
border-radius: 6px;
font-size: 35px;
}
<div class="outter">
<div class="parent">
<span>Thank you for your interest to </span>
<span class="overflowing-span">
<span class='highlight'>Sign up to today's deals</span>
</span>
</div>
</div>