关于div中文字不换行的问题_html/css_WEB-ITnose
来源:懂视网
责编:小采
时间:2020-11-27 16:30:41
关于div中文字不换行的问题_html/css_WEB-ITnose
关于div中文字不换行的问题_html/css_WEB-ITnose:html,css html: 内容不换行,宽度相对变化 复选框 css .labelDiv{ display: inline-block; width:75%; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; } .iconDiv{ di
导读关于div中文字不换行的问题_html/css_WEB-ITnose:html,css html: 内容不换行,宽度相对变化 复选框 css .labelDiv{ display: inline-block; width:75%; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; } .iconDiv{ di

html,css html:
内容不换行,宽度相对变化
复选框
css
.labelDiv{
display: inline-block;
width:75%;
overflow: hidden;
text-overflow: ellipsis;
white-space:nowrap;
}
.iconDiv{
display: inline-block;
vertical-align:middle;
width:25%;
}
大概内容就是这样了,把div中的内容设为不换行实现了,但是.labelDiv的宽度却有了最小的宽度(当缩小的一定时候就不变了,但放大还是可以按比例缩放),如何让其宽度依然按比例缩放呢?新人谢谢解答了
回复讨论(解决方案)
LZ自己不是已经实现了么?
我实现了不换行,但是产生附带的问题了,相对宽度(75%)不能用了,我想问的是这个问题
.labelDiv{ display: inline-block; width:75%; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; float:left;}.iconDiv{ display: inline-block; vertical-align:middle; width:25%; float:right}.clear{clear:both;}
关于div中文字不换行的问题_html/css_WEB-ITnose
关于div中文字不换行的问题_html/css_WEB-ITnose:html,css html: 内容不换行,宽度相对变化 复选框 css .labelDiv{ display: inline-block; width:75%; overflow: hidden; text-overflow: ellipsis; white-space:nowrap; } .iconDiv{ di