作者:jerry827900 | 来源:互联网 | 2023-02-04 14:18
web前端|html教程一个关于position:fixed;的问题web前端-html教程我网页的header部分设置成了position:fixed;正文部分的上端却被head
web前端|html教程
一个关于position: fixed;的问题
web前端-html教程
我网页的header部分设置成了position: fixed;
正文部分的上端却被header遮住了
外贸asp源码,vscode自定义插件路径,ubuntu 网页认证,tomcat的证书文件,爬虫华尔街见闻,php文件调试,seo站群优化效果秒收录,php宠物用品公司网站源码lzw
#header { height: 87px; left: 0; overflow: visible; position: fixed; right: 0; top: 0; z-index: 10000;}#header, #footer { margin: 0 auto; width: 100%;}
正文部分的css:
weather 源码,vscode工具栏,ubuntu穿搭,tomcat 8监控工具,ehentai爬虫,上海 php兼职,seo营销推广软件收录,php网站客服程序,h5 微信商城模板lzw
#wrapper { background: none repeat scroll 0 0 #EDF0EB; height: 500px; margin: 0 auto; padding-bottom: 20px; padding-top: 20px; position: relative; width: 1024px;}
问题出在哪里呢
html5手机相册源码,ubuntu装bin,tomcat的网站怎么进,信息整理爬虫,微分销商城 php源码,邢台seo关键词排名优化lzw
回复讨论(解决方案) 错在你没把HTML贴出
#header 设置了 z-index: 10000;
#wrapper 设置一下 margin-top: 100px;
http://babybang.com/
这个网站没有设置margin-top: 100px; 也是z-index: 10000; 怎么他没有覆盖呢
错在你没把HTML贴出
+是啊。
#wrapper {
background: none repeat scroll 0 0 #EDF0EB;
height: 500px;
margin: 0 auto;
那你这个margin-top 为 0 了啊
#wrapper {
background: none repeat scroll 0 0 #EDF0EB;
height: 500px;
margin: 0 auto;
那你这个margin-top 为 0 了啊 http://babybang.com这个网站的正文 margin-top: 0;也没有遮盖呀
她的body上有
padding-top: 62px;
有人知道么
看来是对牛弹琴了,不是有margin-top就是有padding-top不是明摆着的事吗
你的源码贴全了,让大家看看