验证中...
Languages: CSS
Categories: CSS 技巧
Latest update 2018-04-17 19:29
Snippet 1 Snippet 2 Snippet 3
IMG居中于div
Raw Copy
<style type="text/css">
/*img 居中于*/
div.ww { width:900px;
background: teal;
height:900px;display:table-cell;vertical-align:middle;text-align:center;
}
div.ww img {
vertical-align:middle;
}
/*//要注意的是,如果div浮动了,垂直居中的效果就失效了。自己的解决办法是在div内再套一层,让外层div浮动,里层div如上的样式即可*/
</style>
@OC0B_Y[W211[[WIA$0M66E.png
(~TCMZ_D(XKUG$]3T{[)ZY6.png

Comment list( 0 )

You need to Sign in for post a comment

9_float_left_people 9_float_left_close