日期:2013-11-15  浏览次数:20965 次

网页制造aiyiweb文章简介:平时笔记.

强制换行:word-warp:block-word;
任意大小图片是自顺应居中:
css:
.wrapperBox{border:1px solid red; width:100px; height:100px; display:table-cell; font-size:0; text-align:center; vertical-align:middle; *position:relative;padding:0; overflow:hidden; }
.innerBox{text-align:center; vertical-align:middle; width:100px\9; *width:auto;font-size:0; *position:absolute;*top:50%;*left:50%;}
img{ max-height:100px; max-width:100px; *position:relative;*bottom:50%;*right:50%;margin:0 auto;}
html
<div class="wrapperBox">
<div class="innerBox">
<img src="images/test2.jpg" />