<div class="signpage">
<div class="signbox">
<div class="inputbox"><input type="text" name="account"/></div>
<div class="inputbox"><input type="password" name="pwd" /></div>
</div>
<div>
signpage调整为占满整个页面。
现在需要signbox根据两个input的大小自动调整大小(宽度+高度自动调整)
,并且在页面里居中(水平+垂直)
这个会变?会变的话水平比较麻烦,一般是signbox定高宽,absolute定位,left/top 50%,通过margin-left为-宽/2,margin-top为-高/2来实现水平垂直居中
会变的话需要js来跳转margin-left,margin-top的值了
<div class="inputbox"><input type="text" name="account"/></div>
关键是自动调整大小
还有垂直居中
不好搞
现在流行的方法是什么?如果要用到js我就算了。。。