也许有人有任何好主意如何通过CSS替换我当前的解决方案之一的问题?我有一个有效的JS解决方案,只是好奇,如果只有一个CSS.
A)这里的元素具有相同的宽度,只有元素的数量发生变化(可以更多或更少).
B)这条线应该扩展到这里空的全宽(问题在这里).
C)文本是动态的(总是其他宽度).
是否可以设置B)元素,以便填充宽度?
我的目标是从for循环的值中创建ant assoc数组.
//$from_time value is 6 and $to_time value is 23
for ($i = $from_time; $i <= $to_time; $i++) {
$working_time_array[] = $i;
}
echo json_encode($working_time_array);
Run Code Online (Sandbox Code Playgroud)
我获得了AJAX成功的输出,当我在console.log中时,我得到了结果:
["6",7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]
Run Code Online (Sandbox Code Playgroud)
优选的结果是
["6","7","8","9","10"]... etc
Run Code Online (Sandbox Code Playgroud)