<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title></title> </head> <body> <div class="box"> <p style="display: inline-block">aasdasa</p> <img src="http://pics.taobao.com/bao/album/promotion/taoscars_180x95_071112_sr.jpg" style="width: 50px;height: 20px" /> </div> </body> <style type="text/css"> .box { display: table-cell; vertical-align:middle; width:200px; height:200px; text-align:center; border: 1px solid #eee; } .box img { vertical-align:middle; } </style> </html>
让div里面标签居中的方法
最新推荐文章于 2024-09-04 12:52:05 发布