gpt4 book ai didi

html - Angular 标与导航菜单冲突

转载 作者:行者123 更新时间:2023-11-28 18:56:33 25 4
gpt4 key购买 nike

我的导航菜单与 Angular 落横幅(图像)冲突。但是,它与导航菜单重叠。

这是分辨率大于 1024x768 时的样子:

http://i56.tinypic.com/fkmqn9.png

这是它在分辨率为 1024x768(或更小)的浏览器中的样子:

http://i51.tinypic.com/1z4abo7.png

这是我的代码(用于 Angular 落横幅和导航菜单):

#cornerbanner {
background: url("../images/corner_banner.png") no-repeat;
display: block;
height: 117px;
width: 117px;
position: absolute;
top: 0;
right: 0;
z-index: 999;
text-decoration: none;
margin-top: -1px;
clear: both;
}

ul#navigation {
float: right;
display: inline;
margin-top: -28px;
}

ul#navigation li {
list-style:none;
display: inline;
margin-left: 80px;
text-transform: uppercase;
}

ul#navigation li a {
color: #4C4C4C;
font-size: 13px;
text-decoration: none;
font-weight: bold;
text-shadow: 1px 1px 1px #fff;
}

ul#navigation li.active {
border-bottom: 2px solid #C63E24;
padding-bottom: 3px;
}

最佳答案

希望它在小于 1024 的分辨率下看起来如何?你想让 li 的尺寸变小吗?还是出现水平滚动条?

我的建议是考虑将固定宽度的设计与网格系统相结合,例如:

编辑

如果您希望它们并排放置,您可以:

  • float #cornerbanner 而不是绝对位置
  • 在 ul#navigation 上放置 margin-right: 117px

这两者都要求包含它们的父级足够宽以容纳它们。

关于html - Angular 标与导航菜单冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7669432/

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