首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Z-Index和Positioning:在使用'Particleground‘Jquery插件时,项目不断向下推

Z-Index和Positioning:在使用'Particleground‘Jquery插件时,项目不断向下推
EN

Stack Overflow用户
提问于 2015-03-09 08:06:51
回答 1查看 142关注 0票数 1

我对z索引和定位有些困惑。我读过关于这方面的问题和文章,我一直在努力。

我正在尝试使用一个Jquery插件:'Particleground':https://github.com/jnicol/particleground/find/master

我已经使用了插件,我正在获取页面顶部的粒子。但是我的整个标题页都被下推了,但我想让它出现在顶部。请帮帮我!

EN

回答 1

Stack Overflow用户

发布于 2015-03-09 08:32:41

使粒子容器:

代码语言:javascript
复制
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 0;

和你的内容容器:

代码语言:javascript
复制
position: absolute;
top: 0;
left: 0;
width: 100%;
/* dont touch the height, it will adapt to the content */
z-index: 1;
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28933427

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档