div中图片(大图)居中显示:table-cell;max-width关于i8 bug
- <!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>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>test</title>
- <style type="text/css">
- .Pic{width:50px;height:50px;display:table;table-layout:fixed;}
- .Pic div{display:table-cell;width:50px;height:50px;background:#ccc;vertical-align:middle;}
- .Pic div img{max-width:50px;max-height:50px;}
- </style>
- </head>
- <body>
- <div class="Pic"><div><img src="http://www.leaoo.com/images/logo.gif" alt="Leaoo" /></div></div>
- 我的解决方法,不过要多加个div标签。。。。
- </body>
本人无商业用途,仅仅是学习做个笔记,特别鸣谢小马哥,学习了IOS,另日语学习内容有需要文本和音频请关注公众号:riyuxuexishuji