css 让div垂直水平居中,兼容ie6+
来源:互联网 发布:mac打开appstore好慢 编辑:程序博客网 时间:2024/06/03 01:42
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> </title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css"> body { font-size:12px;font-family:tahoma;} #wrap {background-color:#FFCCFF;width:760px; height:400px;display:table; /*垂直居中因素*/_position:relative; /*垂直居中因素*/ } #subwrap {text-align:center; /*水平居中因素*/vertical-align:middle; /*垂直居中因素*/display:table-cell; /*垂直居中因素*/_position:absolute; /*垂直居中因素*/_top:50%; /*垂直居中因素*/ } #content {width:200px; background:#d0d0d0; margin-left:auto; /*水平居中因素*/margin-right:auto; /*水平居中因素*/_position:relative; /*垂直居中因素*/_top:-50%; /*垂直居中因素*/ }</style></head><body><div id="wrap"><div id="subwrap"><div id="content">ss<br/>ss<br/>ss<br/>ss<br/></div></div></div></body></html>
0 0
- css 让div垂直水平居中,兼容ie6+
- 不定宽高div水平垂直居中(兼容ie6)
- div+css实现Firefox和IE6兼容的垂直居中
- css div水平垂直居中
- css(div水平垂直居中)
- 采用CSS让DIV在网页中水平垂直居中
- css让div在整个网页水平、垂直居中解决方法
- css怎么让div水平垂直居中(转)
- css让一个div水平垂直居中方法大全
- html和css 让div垂直(竖直)和水平居中
- css让div水平垂直居中,用弹性盒子
- div+css垂直居中和水平居中
- DIV水平垂直居中 兼容多种浏览器
- 【DIV+CSS】DIV背景图片水平垂直居中
- HTML+CSS,让div在屏幕中居中(水平居中+垂直居中)方法总结
- HTML+CSS,让div在屏幕中居中(水平居中+垂直居中)方法总结
- 如何让DIV水平和垂直居中
- 如何让DIV水平和垂直居中
- C语言函数返回类型为指针时的一些问题
- EXT2 file system file.c with my comments
- Linux显示所有输出域自动缩小到最短三数字单元和显示单元的打印
- 网页设计:html布局学习1
- 深入理解java异常处理机制
- css 让div垂直水平居中,兼容ie6+
- error MSB8013: 此项目不包含配置和平台组合 Debug|Win32
- file not found: /Users/hx/Library/Developer/Xcode/DerivedData/Build/Products/...
- 今年的第一款量产产品
- [C++杂记] char *str会默认为const char *str
- VIM键盘映射 (Map)
- 首页-样样好商城团购网-淘宝网
- maven项目管理总结(二)配置文件及依赖管理
- IOS通知设置