0
我需要一个在背景图像上半透明的导航栏。右侧的菜单和左侧的半透明导航栏上的Logo
标志在左侧菜单右侧应列表items.Something之间等距像 -
https://getbootstrap.com/examples/cover/
http://bootsnipp.com/snippets/featured/full-screen-background-cover-page
我试着给float:right
到我的菜单列表的<ul>
元它走向了极端。
HTML
<body>
<nav>
<ul style="float:right;">
<li style="display:inline;"><a href= "#">item1</a></li>
<li style="display:inline;"><a href= "#">item2</a></li>
<li style="display:inline;"><a href= "#">item3</a></li>
<li style="display:inline;"><a href= "#">item4</a></li>
</ul>
</nav>
</body>
CSS
body {
background-image:url("giphy.gif");
background-repeat: no-repeat;
background-size: cover;
overflow-x:hidden;
}
nav {
height:60px;
width:100%;
overflow-y:hidden;
overflow-x:hidden;
z-index:1;
background-color: transparent;
}
使徽标成为一个带有bg图像的元素,而不是将其放在body元素上,这样可以更轻松地使用css在页面上移动元素。 – fauverism
http://jsbin.com/ruwopuyavu/edit?html,css,output – fauverism