gpt4 book ai didi

html - 为什么文章之间有差距?

转载 作者:太空宇宙 更新时间:2023-11-03 21:48:00 25 4
gpt4 key购买 nike

我创建了一个包含三篇文章的部分,我想知道为什么文章之间有边距/填充:

enter image description here

我的 html:

<section id="home">

<article>
<h1>Übersicht</h1>
</article>
<article>
<h1>Leute</h1>
</article>
<article>
<h1>Links</h1>
</article>

</section>

还有我的CSS:

section { width: 87%;
margin: 0px auto;
}

article {
width:33%;
font-family: 'Open Sans', sans-serif;
background-color:blue;
display: inline-block;
margin:0px;
padding: 0px;
}

最佳答案

尝试用 block 替换 inline-block 并使用 float:left 请看这个 fiddle

JSFIDDLE EXAMPLE

关于html - 为什么文章之间有差距?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19347194/

25 4 0
文章推荐: c# - 在 C# 中以编程方式使用 cmd.exe
文章推荐: c# - ClickOnce 代码签名 : "Select from Store" or "Select from File"?
文章推荐: c# - 下载文件并同时读取
文章推荐: javascript - 将