易截截图软件、单文件、免安装、纯绿色、仅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到底是用来做什么的?

css是什么?这是初学网页设计的同学们遇到的第一个问题,在学习网页制作之前,你一定要了解网页制作的大局,有了全局的了解,才知道怎么去学习。
网页设计分为:前台页面设计,后台程序设计。
前台页面设计分为:html,css,javasript,ps,flash(这几个都要了解哦,熟练掌握css)
后台程序设计分为:asp,php,asp.net(只要 ......

FireFox与IE中CSS兼容技集锦

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

使用CSS格式化Table样式

在网页里使用table的时候,样式一般比较难管理,因为table的有些样式与其它控件不太一样
1、table的分外边框,tr边框,td边框,它们之间都是有间距的
2、你可以指定它们之间的间距为0,但当你设置边框时,会发现边框是2px宽的,因为在table里,tr、td等元素是相邻的
所以想做一个好看的table样式可以参考以下的步骤:
1 ......

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 ......

IE8的css hack

首先感谢“丸子
”提供的这个
IE8的css hack;
关注过IE8的css hack的人相信大家都在使用这个hack,就是“\9”的css hack:
.test{
color:#000000;                  /* FF,OP支持 */
color:#0000FF\9;&n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号