小编Lau*_*rie的帖子

定位导航栏

屏幕截图:当前主页

屏幕截图:所需的主页/导航

屏幕截图:页脚

我试图在两个图像之一下方的标题中放置一个下拉导航栏。

目前,导航栏向左浮动,因为这是我们目前在课堂上学习的方式,但标题中的两个图像(“徽标”和“在线作品集横幅”)也向左浮动。我想知道是否有办法实现我想要的主页外观,将导航栏放在横幅下方?

代码片段:

nav ul {
    display: inline-block;
    list-style-type: none;
    text-align: center;
    float: left;
}
nav ul li {
    float: left;
    position: relative;
}
nav ul li a {
    display: block;
    min-width: 150px;
    padding: 7px 4px;
    margin-right: 5px;
    background-color: #393939;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
}
nav ul li a:hover {
    color: #2cc1d9;
}
nav ul ul {
    list-style-type: none;
    position: absolute;
    left: -9999px;
}
nav ul ul li {
    float: none;
}
nav ul ul …
Run Code Online (Sandbox Code Playgroud)

html css navigation header

5
推荐指数
1
解决办法
2028
查看次数

标签 统计

css ×1

header ×1

html ×1

navigation ×1