gpt4 book ai didi

html - 试图从我的 h2 标题中删除填充

转载 作者:太空宇宙 更新时间:2023-11-04 12:19:01 25 4
gpt4 key购买 nike

您好,我正在尝试将我的 h2 标题放在它们所在的 div 的顶部,但我不知道如何删除填充/边距/导致它们间隔开的任何内容迄今为止。

这是我第一次尝试使用“部分”,我正在使用它们来创建视差滚动网站。我已经上传了该站点,因此您可以看到它的运行情况。在它声明“标题一”、“标题二”等的地方,这就是我想在它们所在的 div 顶部提出的内容。

示例网站网址... http://www.littleroomproductions.com/jQtest/

以下是我认为需要更改的代码部分,以便将标题带到 div 的顶部...

//HTML

   <section class="box content">
<div id="me"></div>
<div class="container">
<h2>Title One</h2>

<p>This is where text goes </p>
<div class="someContent">
<p>click me</p>
</div>
</div>
</section>

//使用的CSS

section.box:last-child {
margin-bottom: 0;
}

section.box h2 {
padding-top: 0;
margin-bottom: 20px;
color: #606060;
font-family: serif;
font-size: 30px;
}

section.box p {
padding-top: 0;
margin-bottom: 20px;
color: black;
font-size: 20px;
font-family: cursive;
font-weight: 300;
}

section.box p:last-child {
margin-bottom: 300px;
}

section.box.content {
padding-top: 0;
padding-left: 40px;
padding-bottom: 40px;
}

section.box.slide {
padding: 240px 0;
background-position: 0 0;
}

section.box.slide h1 {
color: yellow;
font-size: 48px;
/*line-height: 1;*/
font-weight: 700;
text-align: center;
text-transform: uppercase;
text-shadow: 0 0 10px black;
}

最佳答案

你的

#me #projects #hire 有一个 100px 的 padding-top;

关于html - 试图从我的 h2 标题中删除填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28490816/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com