zoukankan
html css js c++ java
这个固定层的效果
<
html
>
<
head
>
<
style
>
#footer
{
}
{
border-top
:
1px solid #111
;
color
:
#eee
;
background
:
#2B2729
;
padding
:
5px
;
text-align
:
center
;
font-size
:
0.9em
;
font-family
:
"Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, Arial, sans-serif
;
position
:
fixed
;
bottom
:
0
;
width
:
770
;
left
:
50%
;
margin-left
:
-385px
;
}
</
style
>
<!--
compliance patch for microsoft browsers
-->
<!--
[if lt IE 7]><style>
#footer {
position: absolute;
bottom: auto;
clear: both;
top:expression(eval(document.compatMode &&
document.compatMode=='CSS1Compat') ?
documentElement.scrollTop
+(documentElement.clientHeight-this.clientHeight) - 1
: document.body.scrollTop
+(document.body.clientHeight-this.clientHeight) - 1);
}
</style><![endif]
-->
</
head
>
<
body
>
IE7已经支持position:fixed了,而我们的IE6呢?还继续使用js事件?消耗资源,破坏结构,画面闪耀。
今天去一老外站看到了这他站上的十分平滑但却没有js,好奇,原来。。巧妙啊,分享下,相对而言比较节省资源。但效果好,使用方便,兼顾w3c。哈哈
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<
p
>
测试
<!--
begin footer
-->
<
div
id
="footer"
>
joker
</
div
>
</
body
>
</
html
>
http://bbs.blueidea.com/thread-2781970-1-1.html
查看全文
相关阅读:
js-link下载文件
sql-优化建议
Studio-环境变量设置
Studio
Docker下安装ElasticSearch和Kibana
sklearn 中的 r2_score
R语言将所有列数据正交化/缩放
R语言 random forests out-of-bag prediction
R语言 coalesce 函数
R语言 case_when 函数
原文地址:https://www.cnblogs.com/CB/p/1131205.html
最新文章
Pytest系列(11)- 失败重跑插件pytest-rerunfailures的详细使用
Pytest系列(10)
Pytest系列(9)
Pytest系列(8)
Vue外卖五:首页图标导航加滑动分页swiper6用法
vue外卖四:抽取公共组件TopHeader——slot的使用、父传子值
关机关询问是否取消批处理,及功能批处理
jupyter notebook 更改启动默认目录
git 撤消操作所有
vue外卖二:引入/配置路由、底部固定导航按钮+样式+路由跳转
热门文章
rem布局方案二:flexible.js
sublime 路径/文件自动提示 插件安装 autofilename
数据库编程-过程sql
数据库设计
hd + Huawei HS8145C GPON / guangmao luyouqi / OptiXstar 10G PON
hd + fibre
OS + Linux File nfs / samba / rsync / inotify / smb / webdav
OS + Linux tar / tar.gz / gz
OS + Centos7 SAMBA
js-script defer || async
Copyright © 2011-2022 走看看