惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

阮一峰的网络日志
阮一峰的网络日志
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Schneier on Security
The Last Watchdog
The Last Watchdog
Cyberwarzone
Cyberwarzone
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cyber Attacks, Cyber Crime and Cyber Security
L
Lohrmann on Cybersecurity
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 司徒正美
The Cloudflare Blog
V
V2EX
博客园_首页
博客园 - 聂微东
Vercel News
Vercel News
人人都是产品经理
人人都是产品经理
G
GRAHAM CLULEY
T
Tenable Blog
Last Week in AI
Last Week in AI
Y
Y Combinator Blog
L
LINUX DO - 最新话题
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
SecWiki News
SecWiki News
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
T
Troy Hunt's Blog
博客园 - 【当耐特】
Forbes - Security
Forbes - Security
H
Hacker News: Front Page
A
About on SuperTechFans
B
Blog RSS Feed
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
D
DataBreaches.Net
P
Privacy & Cybersecurity Law Blog
Schneier on Security
Schneier on Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Jina AI
Jina AI
D
Docker
P
Proofpoint News Feed

博客园 - fisherman

学习写第一个SQL server触发器 操纵自如--页面内的配合与通信 一些DIV+CSS 命名规范 asp.net 2.0中生成RSS 避免重复提交 - fisherman - 博客园 button 删除确认 - fisherman - 博客园 用相对定位和负向移动完成图片象框阴影 CSS 代码格式化工具 - fisherman - 博客园 JS代码的格式化和压缩 - fisherman - 博客园 把SQL SERVER里表里的数据导出成为insert into 脚本 对FckEditor编辑器在MAXTHON浏览器下选择服务器文件对话框显示不正常的改进 下载网页中远程图片的方法 读取marc数据 关于ISO2709数据的格式说明 C#写的读取ISO2709格式数据的DLL 数据库打开 使用 Engine 对象创建 SQL Server Compact Edition 数据库 用SharpZipLib压缩和解压缩文件 Access数据库压缩和修复
负边距居中法(水平居中、垂直居中) - fisherman - 博客园
fisherman · 2007-08-30 · via 博客园 - fisherman

本法兼容ie、firefox,opera没试过

<style type="text/css">
.box {
 background-color:#000000;
 color:#ccc;
 width:760px;
 height:500px;
 border:1px solid #ccc;
 position:absolute;
 margin:-250px 0px 0px -380px;
 top:50%;
 left:50%
}
h1 { margin:20px;}
h6 { margin:20px; text-align:right;font-size:14px;}
ol { margin:30px; font-size:14px;}
li { margin:10px;}
</style>

<div class="box">
<h1>负边距居中法(水平居中、垂直居中)</h1>
<ol>
 <li>假定容器宽=760px;高=500px;</li>
 <li>设置容器为绝对定位</li>
 <li>水平居中:a.设置左外边距(margin-left)为-380px; b.50%居左(left:50%)</li>
 <li>垂直居中:a.设置上外边距(margin-top)为-250px; b.50%居上(top:50%)</li>
</ol>
<h6>http://www.happyshow.org</h6>
</div>

来源:http://www.happyshow.org/article.asp?id=102