Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何使用自动宽度连续三次分割和最后一次分割?_Html_Css_Css Float - Fatal编程技术网

Html 如何使用自动宽度连续三次分割和最后一次分割?

Html 如何使用自动宽度连续三次分割和最后一次分割?,html,css,css-float,Html,Css,Css Float,我想要一行,文本+文本+中心栏(必须填充剩余宽度) 我试过这个: HTML: URL:停止浮动最后一个并隐藏溢出,您将得到我认为您想要的: .title-bar { overflow:hidden; height:5px; background:red; } 该条将填充所有可用宽度 停止浮动最后一个并隐藏溢出,您将得到我认为您想要的: .title-bar { overflow:hidden; height:5px; background:red; } 该条将填充所有可用宽度 将您的css更

我想要一行,文本+文本+中心栏(必须填充剩余宽度)

我试过这个:

HTML:


URL:

停止浮动最后一个
并隐藏溢出,您将得到我认为您想要的:

.title-bar { overflow:hidden; height:5px; background:red; }
该条将填充所有可用宽度


停止浮动最后一个
并隐藏溢出,您将得到我认为您想要的:

.title-bar { overflow:hidden; height:5px; background:red; }
该条将填充所有可用宽度


将您的css更改为此

.title-cont { float:left: clear:left; width:600px; white-space:nowrap; overflow:hidden; }
    .title-num { float:left; font-size:20px; color:red; }
    .title-text { float:left; font-size:16px; color:blue; }
    .title-bar { overflow:hidden; height:5px; background:red; }

将您的css更改为此

.title-cont { float:left: clear:left; width:600px; white-space:nowrap; overflow:hidden; }
    .title-num { float:left; font-size:20px; color:red; }
    .title-text { float:left; font-size:16px; color:blue; }
    .title-bar { overflow:hidden; height:5px; background:red; }
试试这个

.title-cont { float:left; width:600px; white-space:nowrap; overflow:hidden; }
.title-num { float:left; font-size:20px; color:red; }
.title-text { float:left; font-size:16px; color:blue; }
.title-bar {display:inline-block;width:100%; height:5px; background:red; }
试试这个

.title-cont { float:left; width:600px; white-space:nowrap; overflow:hidden; }
.title-num { float:left; font-size:20px; color:red; }
.title-text { float:left; font-size:16px; color:blue; }
.title-bar {display:inline-block;width:100%; height:5px; background:red; }
很高兴帮了忙