我们有一个提示框,其CSS低于:工具提示框,看起来怪怪当输入文本太长
.radioButton-tooltip
{
position: absolute;
width: 205px;
padding: 5px 20px 5px 35px;
left: 100%;
margin-left: -17px;
font-size: 13px;
background: url(images/tooltip.png) 0 center no-repeat;
color: #ffffff;
display: none;
text-align:left;
z-index:100;
}
.radioButton-tooltip:before, .radioButton-tooltip:after, .radioButton-tooltip .before, .radioButton-tooltip .after
{
content: '';
background-image: url(images/tooltip.png);
background-repeat: no-repeat;
height: 10px;
width: 100%;
display: block;
position: absolute;
left: 0;
z-index:100;
}
.radioButton-tooltip:before, .radioButton-tooltip .before
{
background-position: 0 top;
top: -10px;
z-index:100;
}
.radioButton-tooltip:after, .radioButton-tooltip .after
{
background-position: 0 bottom;
bottom: -10px;
z-index:100;
}
通常情况下,它工作正常。如图所示:
然而,当文本变得很长,它看起来如下:
我不太清楚这是怎么引起的,但我假设它是因为文本太长,超出了原始tooltip.png的最大长度。但问题是我该如何解决这个问题?
谢谢。
添加一个工作演示,了解HTML结构 – aje
你可以包括你的HTML以及 –
添加'溢出-Y:滚动;'如果你不想要的布局被打破。这可能是你使用的绝对位置,它在'px'中。 – user3771102