易截截图软件、单文件、免安装、纯绿色、仅160KB

页面元素居中 css获取页面中心位置

css获取页面中心位置
.fixed
{
FONT-SIZE: 30pt;
color : #1A6841;
left:expression(eval(document.body.clientWidth)/2-150);
top:expression(eval(document.body.clientHeight)/2-25);
width:300px;
height:50px;
border:green 1px solid;
background:#99CCFF;
+position:absolute;
+left:expression(eval(document.body.scrollLeft)+eval(document.body.clientWidth)/2-150);
+top:expression(eval(document.body.scrollTop)+eval(document.body.clientHeight)/2-25);
}
网页可见区域宽:document.body.clientWidth
网页可见区域高:document.body.clientHeight
网页可见区域宽:document.body.offsetWidth (包括边线的宽)
网页可见区域高:document.body.offsetHeight (包括边线的宽)
网页正文全文宽:document.body.scrollWidth
网页正文全文高:document.body.scrollHeight
网页被卷去的高:document.body.scrollTop
网页被卷去的左:document.body.scrollLeft
网页正文部分上:window.screenTop
网页正文部分左:window.screenLeft
屏幕分辨率的高:window.screen.height
屏幕分辨率的宽:window.screen.width
屏幕可用工作区高度:window.screen.availHeight
屏幕可用工作区宽度:window.screen.availWidth
通用对联实现,Div在底部浮动
<table width="1003" border="0" cellspacing="0" cellpadding="0" align="center" id="maple1">
<tr>
    <td align="center" height="30" bgcolor="#999999">浮动内容哦</td>
</tr>
</table>
<script type="text/javascript" src="Maple_Couplet.Js"></script>
<script type="text/javascript">
window.onload = function(){
   n=window.screen.height; //屏幕的分辨率
   m=window.screenTop;   //网页内容距屏幕顶部的距离 即 IE按钮,地址栏等的高度
   myBottom=n-m-30-50; //n-m-显示Div的高-底部状态栏和任务栏的高约50
   //aa.innerHTML=m;
        new couplet("maple1",myBottom,40);
}
</script>
<SCRIPT language="JavaScript" type="text/javascript">
function openmu() {
     //var left = screen.width;
 &


相关文档:

CSS分栏布局的方法:绝对定位和浮动

CSS分栏布局的方法:绝对定位和浮动
出处:网页教学网
作者:佚名
日期:2009-03-09
 
 在CSS中,实现分栏布局有两种方法。第一种方法是使用四种CSS定位选项(absolute
、static、relative和fixed)中的绝对定位(absolute
positioning),它可以将文档中的某个元素从其原本位置上移除,并重新定位 ......

FireFox与IE中CSS兼容技集锦

1 针对firefox ie6 ie7的css样式
现在大部分都是用!important来hack,对于ie6和firefox测试可以正常显示,
但是ie7对!important可以正确解释,会导致页面没按要求显示!找到一个针
对IE7不错的hack方式就是使用“*+html”,现在用IE7浏览一下,应该没有问题了。
现在写一个CSS可以这样:
#1 { color: #33 ......

DIV css 相对父容器 水平、垂直 居中

终于把它写出来了。哈哈
<div style="width:100%;height:100%;position:relative;overflow:hidden;"
    ><br style="line-height:0;"
    /><div style="position:relative;top:50%;left:50%;"><br style="line-height:0;"
    /><div style ......

CSS样式表命名规则

样式选择符命名
选择符以类型分,同类放一起,类的定义顺序以HTML中实际的顺序为参考,以方便查找为主, 使用类似下面的规则:
[模块前缀 | 类型 | 作用]_[名称]_[状态 | 位置]
约定模块、类型、状态、位置等的所使用的单词或其缩写,保持上面的顺序,尽量保持在两到三个单词说清用途。
 
通用名词缩写
设置
set ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号