Css 尝试仅显示未包装的文本
我有一个图像和一些文本,它位于图像中。我的问题是,由于显示了我想要的长度,所以当文本被包装时Css 尝试仅显示未包装的文本,css,Css,我有一个图像和一些文本,它位于图像中。我的问题是,由于显示了我想要的长度,所以当文本被包装时 .temp-image .list .list.caption { background-image:url(bar.png); font-size: 16px; font-weight: bold; height: 30px; left: 1px; line-height: 16px; overflow: hidden; text-align: center;
.temp-image .list .list.caption {
background-image:url(bar.png);
font-size: 16px;
font-weight: bold;
height: 30px;
left: 1px;
line-height: 16px;
overflow: hidden;
text-align: center;
top: 190px;
width: 256px;
}
将
空白:nowrap
添加到css
.temp-image .list .list.caption {
background-image:url(bar.png);
font-size: 16px;
font-weight: bold;
height: 30px;
left: 1px;
line-height: 16px;
overflow: hidden;
text-align: center;
top: 190px;
width: 256px;
white-space: nowrap; /* Prevents Wrapping */
}
@想要学习谢谢,我知道有一个破折号在那里的某个地方,我把它放在nowrap原来。