源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

跨浏览器的实践:position:fixed 层的固定定位

  • 时间:2020-05-15 05:07 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:跨浏览器的实践:position:fixed 层的固定定位
看示例吧: <style type="text/css"> body{ margin:0; padding:30px 0 0 0; } div#menu{ position:absolute; top:0; left:0; width:100%; height:30px; background-color:#ddd; } @media screen{ body>div#menu{ position:fixed; } } * html body{ overflow:hidden; } * html div#content{ height:100%; overflow:auto; } </style> HTML示例:
[Ctrl+A 全选 注:[url=http://www.1sucai.cn/article/23421.htm]如需引入外部Js需刷新才能执行[/url]]
你删除第一行注释看看效果如何?
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部