兼容IE6 7 8 chrome firefox图片水平垂直居中
来源:互联网 发布:javascript 权威指南 编辑:程序博客网 时间:2024/05/14 14:30
工作中用到做笔记,table-layout: fixed;解决IE8下左右边距变大,Google到的解决办法
http://bytes.com/topic/html-css/answers/870359-ie8-display-table-cell-max-width-bug
<div class="item"><p><img src="http://www.kddev.com/upload/member/22/22_4a37c7c814fbe57010db5b619a92d414.jpg_240x240.jpg"></p></div>
/*图片列表 兼容IE6水平垂直居中*//*For Firefox Chrome*/.photo-list .item{float: left;cursor: pointer;border:1px #eee solid;width:100px;height:100px;table-layout: fixed;overflow:hidden;text-align:center;display:table;float:left;margin-left:20px; margin-top: 20px;position:relative;}.photo-list .item p{display:table-cell;vertical-align:middle;width:100px;height:100px;}.photo-list .item img{margin:0 auto;max-width:100px;max-height:100px;}/*For IE7*/*+html .photo-list p{position:absolute;top:50%;width:auto;text-align:center;height:auto;}*+html .photo-list p img{position:relative;top:-50%;left:-50%;}/*For IE6*/*html .photo-list p{position:absolute;top:51%;width:100%;text-align:center;height:auto;display:block;}*html .photo-list p img{position:relative;top:-50%;left:-50%;width:expression(this.width>100?"100px":"auto");height:expression(this.height>100?"100px":"auto");}
0 0
- 兼容IE6 7 8 chrome firefox图片水平垂直居中
- 水平垂直居中图片及文字(兼容IE6+)
- 水平垂直居中图片及文字(兼容IE6+)
- 水平垂直居中图片及文字(兼容IE6+)
- 图片水平居中兼容IE6、7、8和FF
- IE8中实现垂直居中(兼容IE6、IE7、IE8,Firefox,Chrome等)
- css 让div垂直水平居中,兼容ie6+
- 不定宽高div水平垂直居中(兼容ie6)
- div+css实现Firefox和IE6兼容的垂直居中
- DIV实现input垂直居中 兼容IE6和Firefox
- DIV实现input垂直居中 兼容IE6和Firefox
- div+css实现Firefox和IE6/7兼容的垂直居中
- 图片垂直水平居中 支持IE6、IE7、IE8、FF等
- 图片水平垂直居中
- 图片垂直水平居中
- 图片 垂直 水平 居中
- 图片水平垂直居中
- 图片水平垂直居中
- nginx gzip duplicate MIME type “text/html”
- android调用Webservice
- c_str()用法
- MySQL数据库基准压力测试工具之MySQLSlap使用实例
- 判断一个数是否为对称的数
- 兼容IE6 7 8 chrome firefox图片水平垂直居中
- 商店应用的进程模型 -- 管理App
- Android回顾之数据存储
- yum出错Error: Cannot find a valid baseurl for repo: base
- Stanford 机器学习 第一讲-------监督学习,无监督学习和半监督学习
- 我见过的关于notify()和notifyAll()区别的最简洁的代码
- spring静态变量注入
- 企业云集成平台MuleSoft获5000万美元融资
- 关于QGis编译