【发布时间】:2020-08-19 12:59:35
【问题描述】:
我不知道如何将其与徽标对齐。我正在尝试使用填充,但它不起作用,甚至浮动,也许我会更改容器大小以使其工作。顺便说一句,由于溢出不允许链接,您将无法看到图像和 li 选项,因此我附上了图像以更方便 如果可能的话,甚至可以告诉一些提示,以便在 HTML 中做得更好
header {
height: 600px;
background-image:urlenter code here;
background-repeat: no-repeat;
background-size: cover;
}
.header-container {
height: 1240px;
width: 1240px;
padding-left: 3%;
}
.header-logo{
height: 150px;
width: 450px;
}
img.logo{
width: 400px;
height: 150px;
}
nav {
padding-top: 10px;
}
nav ul {
margin: 0;
padding:0;
}
nav ul li {
display: inline-flex;
margin-left: 50px;
list-style-type: none;
}
nav ul li a {
padding-bottom: 11px;
font-family: 'Raleway', sans-serif;
font-weight: bold;
font-size: 16px;
text-transform: uppercase;
text-decoration: none;
letter-spacing: 0.1em;
color: #111111;
}
nav ul li a:hover {
border-bottom: 2px solid #f22222;
}
<html lang="en">
<head>
<link rel="stylesheet" href="./css/style.css">
<title>Katalyst Incorporation LLC.</title>
</head>
<body>
<header id="up">
<div class="header-container">
<nav>
<div class="header-logo">
<img class="logo" src="./img/katalyst incorporation logo.png" alt="logo">
</div>
<ul>
<li><a href="index.html">HOME</a></li>
<li><a href="index.html">HOME</a></li>
<li><a href="index.html">HOME</a></li>
<li><a href="index.html">HOME</a></li>
<li><a href="index.html">HOME</a></li>
</ul>
</nav>
</div>
</header>
</body>
</html>
【问题讨论】:
-
也许它会帮助你请检查:w3schools.com/howto/…