gpt4 book ai didi

html - 我在导航栏和一个部分之间有一个空间。谁能看到错误?

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

我在导航栏和 section1 之间有一个中断/边距。我正在使用 Bootstrap ,并且没有发现任何问题。为了删除这个空间,我需要添加一个额外的类吗?有谁知道出了什么问题?谢谢!

h1 {

font-family: 'Raleway', sans-serif;

}

body {

background-color: black;

}

section.section1 {

height: 100%;
background-image: url("images/background3.jpg");
background-attachment: fixed;
background-repeat: no-repeat;

background-size: cover;

}



.title-div {

position: relative;
top: 50%;
transform: translateY(-50%);
text-align: center;

}

.title {

text-align: center;
color: white;
font-size: 7vw;
font-family: 'Raleway', sans-serif;
}

.typed-cursor{

opacity: 1;
-webkit-animation: blink 0.7s infinite;
-moz-animation: blink 0.7s infinite;
animation: blink 0.7s infinite;
color: white;
font-size: 7vw;
font-family: 'Raleway', sans-serif;
}
@keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-webkit-keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
@-moz-keyframes blink{
0% { opacity:1; }
50% { opacity:0; }
100% { opacity:1; }
}
<html>

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="js/typed.js"></script>
<script src="bootstrap/js/bootstrap.js"></script>

<head>

<link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link href='http://fonts.googleapis.com/css?family=Lato|Raleway' rel='stylesheet' type='text/css'>



</head>

<body>

<div class = "navbar navbar-inverse navbar-static-top">
<div class = "container">
<div class="navbar-header">

<a href = "#" class = "navbar-brand">Cotton Fencing</a>

<button class = "navbar-toggle" data-toggle = "collapse" data-target=".navHeaderCollapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>

</button>
</div>

<div class="collapse navbar-collapse navHeaderCollapse">
<ul class="nav navbar-nav navbar-right">

<li><a href = "#">Home</a></li>


</ul>
</div>
</div>

</div>

<section class="section1" id="section1">
<div class="title-div">

<script>
$(function(){
$(".element").typed({
strings: ["Beautiful. ^700", "Easy. ^700", "Cheap. ^700", "Cotton Fencing."],
typeSpeed: 0
});


});


</script>


<span class="element title"></span>
<span id="typed-cursor"></span>


</div>
</section>

</body>



</html>

已更新 这是它的外观图片。仅供引用,背景设置为黑色。

What it looks like

UPDATE 2 非常感谢大家的帮助!感谢 Mike Barwick 发现错误。我想我们都想得太深了,答案很明显。再次感谢您的帮助!

最佳答案

这会起作用(我认为大声笑)...根据您的图像。

.navbar {
margin-bottom: 0;
}

关于html - 我在导航栏和一个部分之间有一个空间。谁能看到错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29309613/

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