Html 如何使列(网格模板列)只占用内容的空间(宽度)?
我想要的是这些列之间几乎没有空间。 相反,它们是超间隔的 我尝试的任何自动/自动填充/自动拟合组合都不起作用。请问我可能遗漏了什么 我的朋友: HTMLHtml 如何使列(网格模板列)只占用内容的空间(宽度)?,html,css,Html,Css,我想要的是这些列之间几乎没有空间。 相反,它们是超间隔的 我尝试的任何自动/自动填充/自动拟合组合都不起作用。请问我可能遗漏了什么 我的朋友: HTML 尝试将显示:flex添加到.object1类中 .object1{ min-width:100%; max-width:100%; display:flex; max-height:20px; /*grid-template-columns: 40px 92px auto;*/ grid-te
尝试将显示:flex添加到.object1类中
.object1{
min-width:100%;
max-width:100%;
display:flex;
max-height:20px;
/*grid-template-columns: 40px 92px auto;*/
grid-template-columns: auto-fill;
column-gap: 16px;
}
是否尝试过在网格模板列中指定列空间?
.object1{
min-width:100%;
max-width:100%;
display:inline-grid;
max-height:20px;
/*grid-template-columns: 40px 92px auto;*/
grid-template-columns: auto-fill;
column-gap: 16px;
}
.midpic{
grid-row:1;
align-items:center;
}
.rightColb{
grid-row:1;
flex-direction: column;
max-width:85%;
}
.object1{
min-width:100%;
max-width:100%;
display:flex;
max-height:20px;
/*grid-template-columns: 40px 92px auto;*/
grid-template-columns: auto-fill;
column-gap: 16px;
}