CSS里如何让引用样式表里的DIV居中?
<style>.box{ width:320px; height:72px;
margin:0px auto;
position:relative; background:transparent; cursor:pointer; }.box .bmbox{ width:320px; height:72px; background:transparent; position:relativee; display:none; }.box:hover .bmbox{ width:320px; height:100%; background:transparent; opacity:0; position:absolute; bottom:0px; left:0px; display:block; text-align:center; opacity: 0; transition: opacity 0.5s; } .box:hover .bmbox:hover{ opacity: 1; }</style><table width="990" border="0" cellspacing="5"> <tr> <td><div class="box"> <img src="图片链接" width="320" height="72"> <div class="bmbox img"> <img src="图片链接" width="320" height="72"> </div> </div></td> <td><div class="box"> <img src="图片链接" width="320" height="72"> <div class="bmbox img"> <img src="图片链接" width="320" height="72"> </div> </div></td> </tr></table>
不出意外,给box 加这句就好了。