【发布时间】:2020-08-09 15:15:27
【问题描述】:
我似乎无法让徽标移动。 我想在导航栏中有徽标但是无论我尝试什么,它都卡在了位置。 我尝试应用!important,设置顶部,底部,但它不会移动。有人知道这里有什么问题吗? 另外,导航栏上的文本不会将颜色变为黑色,提前谢谢`
.top {
/* background-color:4D4D4D;*/
background-image: url("first-background-2.png");
object-position: center;
background-repeat: no-repeat;
background-attachment: scroll;
background-size: cover;
padding-bottom: 300px;
height: 920px;
}
#logo {
text-align: left !important;
opacity: 80%;
float: left;
height: 600px;
top: 60px;
left: 60px
}
.text {
padding-right: 20px!important;
color: black !important;
font-size: 30px;
font-weight: bold;
text-align: right;
word-spacing: 20px;
}
#topnav {
background-color: white;
width: 100%;
height: 100px;
padding-top: 60;
opacity: 60%;
position: relative;
top: -1150px;
display: inline-block;
}
<!docktype html>
<html>
<body>
<head>
<style type="text/css">
body {
margin: 0;
}
</style>
<link href="edusolut.css" type="text/css" rel="stylesheet">
<title>Edusolut</title>
</head>
<nav id="top bar">
<div class="top">
</div>
<!-- navbar-->
<div id="topnav">
<div id="logo">
<img src="./logo2.png" width="auto" height="162 pt" alt="edusolut logo">
</div>
<nav class="text">
<a class="active" href="#top">Home</a>
<a href="#news">Training</a>
<a href="#contact">Contact</a>
<a href="#about">Service</a>
</nav>
</div>
</nav>
<!-- end navbar-->
【问题讨论】:
-
您希望徽标在导航栏中的哪个位置?你的预期输出是什么?
-
非常感谢大家!!