基本上我正在为大学做一个元素,我需要左侧的 Logo ,现在根本没有出现,右侧的 nav
按钮和一些社交媒体图标最右边的,我还没有添加图标,因为我连这部分都做不好。
我知道代码搞砸了,但这是我第一次使用 CSS 和 HTML,而且如果我想在 nav
项之间插入一个元素符号,这可能吗?
Here是CodePen
头部
<link rel="stylesheet" href="ab.css" type="text/css" />
<meta name="viewport" content="width=device-width, intial-scale=1.0">
<!-- Slider -->
<link rel="stylesheet" href="flexslider.css" type="text/css">
<link rel="stylesheet" href="ab.css" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="jquery.flexslider.js"></script>
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider();
});
</script>
<body class="content">
<header>
<div class="navbuttons">
<div class="nav-main-wrapper">
<nav class="nav-main">
<ul>
<li><a class="logo" href="index.html"></a></li>
<li><a href="#">QUIET</a></li>
<li><a href="#">RAIN</a></li>
<li><a href="#">THOUGHTS</a></li>
<li><a href="#">CRAZY</a></li>
</ul>
</nav>
</div>
</div>
</header>
</div>
CSS
.navbuttons{
background:#0099cc;
position:relative;
padding: 30px 0px 33px 0px;
height: 60px;
margin-bottom: 10px;
}
header{
margin-top: 0px;
position: relative;
z-index:-1;
}
.branding img{
position: relative;
top: 0px auto;
float: left;
margin: 0px 0px 156px 0px;
}
.logo{
background: url("http://tinypic.com/r/30k62ae/5");
background-repeat:no-repeat;
height:140px;
display:block;
width:105px;
margin-top:-80px;
left: 30px;
margin-left: 30px;
padding: 0;
}
.nav-main-wrapper{
float:left;
min-width: 470px;
bottom: 300px:
margin: 22px 0px 22px 47px;
}
.nav-main{
float:left;
clear:both;
}
.nav-main ul{
float:left;
display:block;
font-size:22px;
}
.nav-main ul li{
display:inline;
color:#237dac;
font-family: LeagueGothic;
}
.nav-main ul li a{
color: #fff;
margin-left: 128px;
text-decoration: none;
}
.nav-main ul li a:hover{
color:#056495;
text-decoration: none;
}
.nav-main ul li:last-child:after{
content: "";
}
.nav-main ul li a {
white-space: nowrap;
text-decoration: none;
}
@font-face {
font-family: LeagueGothic;
src: url('LeagueGothic-Regular.otf');
}
最佳答案
您将 Logo 链接到 http://tinypic.com/view.php?pic=30k62ae&s=5这不是图像,而是页面。
关于html - 我需要在右上角显示我的 Logo ,并且需要在导航栏中显示我的其他列表元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17247763/