一个词在标题中不起作用
问题描述:
有谁知道为什么登录不会将自己定位为其他词语?另外,白线没有显示出来。
无论如何,这是编码。
HTML
Does anyone know why the "Sign In" won't position itself as the other words? Also the white line is not showing as on the other words.
Anyhow, here is the coding.
HTML
<html>
<head>
<link rel="stylesheet" type="text/css" href="ep.css">
</head>
<body>
<nav id="nav-1">
<a class="link-1" href="#">logo</a>
<a class="link-1" href="#">Buy</a>
<a class="link-1" href="#">Rent</a>
<a class="link-1" href="#">Mortgage</a>
<a class="link-1" href="#">Moving</a>
<a class="link-1" href="#">News</a>
<a class="link-2" href="#"> Sign In</a>
</nav>
<img src="images/si.jpg" alt="Mountain View">
</body>
</html>
CSS
CSS
@import url(http://fonts.googleapis.com/css?family=Raleway);
body {
margin: 0px;
}
nav {
margin-top: 0px;
padding: 20px;
text-align: left;
font-family: Raleway;
}
#nav-1 {
background: #6CC204;
}
.link-1 {
transition: 0.3s ease;
background: #6CC204;
color: #ffffff;
font-size: 16px;
text-decoration: none;
border-bottom: 0px solid #6CC204;
padding: 20px 0;
margin: 0 20px;
}
.link-1:hover {
border-bottom: 4px solid #ffffff;
padding: 6px 0;
}
.link-2 {
transition: 0.3s ease;
background: #6CC204;
color: #ffffff;
font-size: 16px;
text-decoration: none;
border-bottom: 0px solid #6CC204;
padding: 20px 0;
margin: 0 20px;
left:1430px;
position:absolute;
}
.link-2:hover {
border-bottom: 4px solid #ffffff;
padding: 6px 0px;
}
img {
position: absolute;
left: 1400px;
top: 20px;
}
答
将其改为......
Change it to...
<a class="link-1" href="#"> Sign In</a>