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

CSS控制DIV水平垂直方向剧中

  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
body{position:relative; border:solid 1px #30F; height:600px; }
.box{ position:absolute; left:50%; top:50%; height:300px; width:400px; margin-top:-150px; margin-left:-250px;/*这个是本宽度度的一半*/ border:solid 1px #0F0; }
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>


相关文档:

css js 在不同浏览器兼容性问题总结

最近的面试中总是问我一些浏览器兼容性问题,所以下面做一个总结:
为什么会出现这种现象呢?主要就是像Firefox这样浏览器良好支持W3C标准,是目前对CSS支持最好的浏览器,而ie是出现的比较早,在w3c支持方面做的一直不是很好。有很多东西出现FF和IE显示不一样的根本原因在于它们的默认显示不一样,而这个默认样式该如何显 ......

jQuery:CSS阴影对话框

jQuery插件: jquery.widget.shadowbox.js
/**
* 一个简单的设置DIV阴影的插件
*
* 功能:
* 1. 根据阴影宽度自动调整外层容器宽度,以及透明度
* 2. 可定义ShadowBox的宽度和高度
* 3. 可用CSS样式表定义可视化样式
*
* @author joe.he <developerworks@163.com>
* @copyright irgs.cn
*/
(fun ......

CSS处理div中对象垂直对齐

CSS设置
<style type="text/css">
.box {
border:#eee solid 1px;
width:300px;
height:120px;
line-height:120px;
display:table-cell;
vertical-align:middle;
text-align:center;
}
</style>
1.文本
<div class="box">Sample text</div>
Sample text
2.图片(IE下在图片后面加一 ......

[css Hack]IE6,IE7,IE8,FireFox的css相容性

1.区别IE和Firefox
.title {
background:blue; /*Firefox */
background:red \9; /*IE6、IE7、IE8*/
}
2.区别IE6、IE7、IE8、Firefox
.title {
background:blue; /*Firefox */
background:red \9; /*IE6、IE7、IE8 */
*background:black; /*IE7 */
_background:orange; /*IE6 */
}
注意,无论怎样,都是FireFox ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号