【问题标题】:fixed layer scrolling固定层滚动
【发布时间】:2013-02-06 16:40:53
【问题描述】:

HTML:

<div id="wrap">
<div id="header">
<div class="logo"></div>
<div class="category"></div>
</div>
</div>

CSS:

#wrap { 
width:960px; 
margin:0 auto; 
position:relative; }


#header_wrap { 
position:fixed; 
top:0; 
left:0; 
width:100%; 
min-width:960px; 
height:105px; 
background:rgba(256, 256, 256, 0.6); z-index:999; }


#header {  
width:860px; 
position:relative;  
height:90px; 
padding:15px 40px 0 40px; 
margin:0 auto;  }

.logo { 
float:left; 
margin-top:-35px; }

.category { float:right; margin-top:-9px; }

我在页面顶部制作了一个固定的标题菜单。 但是如果浏览器窗口的宽度小于换行宽度(特别是在 iphone/ipad 中放大 safari 时),我看不到标题(固定)的右侧(类别)。 救命!

【问题讨论】:

    标签: css scroll css-float css-position


    【解决方案1】:

    不要在'px' 中指定宽度,以% 的形式给出,当您最大化或最小化您的浏览器时,滚动条会出现并切断您的 div

    【讨论】:

      猜你喜欢
      • 2012-11-24
      • 1970-01-01
      • 2012-04-04
      • 2012-07-24
      • 2019-04-25
      • 2017-11-26
      • 2019-01-31
      • 2018-11-25
      • 2017-08-07
      相关资源
      最近更新 更多