CSS备忘

/******************分别处理input button和textbox**********************/
<style type="text/css">
input {
 width:20px
 }
input {
 width:expression(this.type=="text"?"200px":"style");

 }
input[type="text"] {
 width:200px
 }
</style>
<input type="radio" />
<input type="checkbox"  />
<input type="text" />

 

 /******************width:auto vs. width:100% demo page**********************/

http://www.456bereastreet.com/lab/width-auto/ 

auto的时候,content的width加上horizontal padding,margin 以后 container的宽度

而100%的时候,是width=container的宽度,加上horizontal 的padding和margin以后,要大于container的宽度 


 

posted @ 2012-09-25 21:31  举重-若轻  阅读(146)  评论(0)    收藏  举报