我有一张图像,我需要它水平滚动(由于响应菜单向左移动内容) 并垂直固定(徽标始终垂直固定)。
锁定垂直滚动
我想锁定垂直滚动,但让滚动水平工作。
我想是这样的,
vertical.position:fixed
horizontal.position:relative
但如果这是不可能的,我想知道是否有可能使Ø为徽标范围框。
我已经尝试过的溢出和立场...
谢谢
HTML
<div class="site-wrap">
<div id="bar">
<div id="baar">
<img src="images/logo2.png" alt="logo2" width="124" height="56" />
</div>
</div>
</div>
CSS
#bar {
height: 88px;
width: 100%;
position: relative;
top: 0;
left: auto;
z-index:2;
float: right;
}
#baar {
height: 56px;
width: 100%;
background: linear-gradient(top, #e3e3e3 0%, #f9f9f9 100%);
background: -moz-linear-gradient(top, #e3e3e3 0%, #f9f9f9 100%);
background: -webkit-linear-gradient(top, #e3e3e3 0%, #f9f9f9 100%);
background-image: -ms-linear-gradient(top left, #e3e3e3 0%, #f9f9f9 100%);
background-image: -o-linear-gradient(top left, #e3e3e3 0%, #f9f9f9 100%);
background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0, #f9f9f9), color-stop(1, #e3e3e3));
background-image: linear-gradient(to bottom right, #e3e3e3 0%, #f9f9f9 100%);
box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.15);
box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.15);
position: relative;
overflow-y: inherit;
left: auto;
text-align: center;
margin-top: 16px;
top:0;
}
.site-wrap {
min-width: 100%;
min-height: 100%;
background-image: url(images/pat3.png), url(images/pat.gif);
background-size: 100% 100%, auto;
position: relative;
top: -18;
bottom: 100%;
left: 0;
z-index: 1;
}
你能给我们一个jsfiddle链接的代码吗? –
请在您的问题中添加代码 – Harsh
这是很多代码...但我会添加容器和酒吧分区...等待第二个 –