<!doctypehtml><html><head><metacharset="utf-8"><title>纯css实现吸顶效果-</title><scriptsrc="/jquery/1.11.3/jquery.min.js"></script><style>.header{width:100%;height:160px;background:#87CEEB;}nav{width:100%;height:100px;position:sticky;top:0px;background:#F98202;}.content{width:100%;background:blue;height:1000px;}footer{background:#87CEEB;}</style></head><body><divclass="header"></div><nav>用于显示粘性定位的头</nav><divclass="content"></div><footer>底部</footer><script></script></body></html>
900字范文,内容丰富有趣,生活中的好帮手!