gpt4 book ai didi

html - 导航窗口问题

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

我一直在尝试创建自己的网站,并且已经对导航栏进行了数小时的修改。我似乎无法让它看起来像这样:

Abdullahi Farah 主页博客联系方式

这是它目前的样子:

Abdullahi Farah                         
contactBlogHome

我如何才能将我的名字和选项卡保留在同一个 lin 和同一个 div 中,并使用相同的背景图像。也不要让它掩盖 class='intro'

的一部分

CSS:

.nav {
background-color: #000000;
color: #CCCCCC;
font-style: italic;
font-size: 30px;
border-color: 000000;
position: absolute;
top: 0px;
right: 0px;
left: 0px;
}

.Menu li{
display: inline;
background-color: #000000;
float:Right !important;
}

.Menu li a{
color: #CCCCCC;
font-style: italic;
font-size: 20px;
text-decoration: none;
}

.Menu li a:hover {
color: #FFFFFF;
}


.intro {

}

HTML:

<!DOCTYPE html>
<html>
<head>
<Title>Abdullahi Farah</Title>
<link rel="stylesheet" href="My Site Template.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="styling my site.js"></script>
</head>

<body>

<div class='nav'>
<h1 class='Name'>Abdullahi Farah</h1>
<ul class='Menu'>
<li><a href='#'><span>Home</span></li>
<li><a href='#'><span>Blog</span></li>
<li><a href='#'><span>Contact</span></li>
</ul>
</div>

<div class='Intro'>
<img src="http://www.facets.la/fullview/F_2013_007_AZTEC.jpg">
<img src="https://scontent-a.xx.fbcdn.net/hphotos-xfp1/t1.0-9/10155548_10201867486469738_7586118961374075182_n.jpg">
<p>Programmer and Designer</p>
<p>Twitter <a href="https://twitter.com/ThaAlumniGR">#ThaAlumniGR</a></p>
<p>Linkedin <a href="http://www.linkedin.com/pub/abdullahi-farah/77/b19/ab3">#abdullahi-farah</a></p>
<p>Github <a href="https://github.com/Abdullahif14688">#Abdullahif14688</a></p>
<p>Stack Overflow <a href="http://stackoverflow.com/users/2890980/abdullahi-farah">#abdullahi-farah</a></p>
<p>Coderbits <a href="https://coderbits.com/Abdullahif14688">#Abdullahif14688</a></p>
</div>

<div class='bio'>
<h1 class='Welcome'>Welcome</h1>
<h1>Bio</h1>
<p>blah blah blah</p>
<img src="https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-xpa1/v/t1.0-9/247574_10150198699471099_3320663_n.jpg?oh=f1bd74bf2d5fdeb17ea7e778a66cf05b&oe=54409CEE&__gda__=1414378754_c42f1ccf18cdb4515fe7128488a85c4a">
<h1>Projects</h1>
<p>blah blah blah</p>
<img src="http://sgaul.de/wp-content/uploads/2012/09/adobe-source-code-font.png">
<h1>Products</h1>
<p>blah blah blah</p>
<img src="http://i1.birminghammail.co.uk/incoming/article361484.ece/alternates/s615/Apple-GooglePlay-LOGOS.jpg">
</div>


</body>

</html>

最佳答案

将 html 更改为:

  <div class='nav'>
<ul class='Menu'>
<li><a href='#'><span>Home</span></li>
<li><a href='#'><span>Blog</span></li>
<li><a href='#'><span>Contact</span></li>
</ul>
<h1 class='Name'>Abdullahi Farah</h1>

</div>

和 css 部分为:

.Menu
{
display: inline-block;
float: right;
list-style: none outside none;
width: 40%;
}
.Menu li{
display: inline;
background-color: #000000;
}

它会起作用...:)

关于html - 导航窗口问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25083154/

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