固定定位无滚动 [英] Fixed Positioning without Scrolling

查看:132
本文介绍了固定定位无滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工具栏div在我的IUI。我想固定工具栏的位置,而不滚动。我如何做到这一点?请帮助我。

解决方案

在CSS中使用 position:fixed p>

请参阅: http ://www.digital-web.com/extras/positioning_101/css_positioning_example.php 我总是回来,因为它有很多好的信息在CSS中的定位...



您可以使用类似的:

  div#toolbar 
{
height: 6em;
left:0px;
position:fixed;
top:0px;
width:100%;
z-index:1;
}


I have a toolbar div in my IUI. I want to fix the position of toolbar without scrolling. How can I do this ? please help me.

解决方案

use position: fixed in CSS

refer to: http://www.digital-web.com/extras/positioning_101/css_positioning_example.php I always refer back as it's got a lot of good info on positioning in CSS...

you could use something like:

div#toolbar
{
height: 6em;
left: 0px;
position: fixed;
top: 0px;
width: 100%;
z-index: 1;
}

这篇关于固定定位无滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆