1 <!doctype html> 2 <html lang="zh"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>1 2 3</title> 6 <style> 7 body{ 8 margin:0; 9 padding:0; 10 } 11 #wrap{ 12 display:flex;height:200px; 13 } 14 #d1,#d2,#d3 { color:#fff; text-align:center;} 15 #d1{ width:140px; background:#FF6994; flex-shrink:0;} 16 #d2{ width:233px; background:#FF9B69; flex-shrink:0;} 17 #d3{ flex-grow:1; background:#69ADFF;} 18 </style> 19 </head> 20 <!-- 21 div3栏布局,左边和中间固定宽度,右边自适应怎么弄,求助 22 http://www.oschina.net/question/1053665_223874 23 --> 24 <body> 25 <div id="wrap"> 26 <div id="d1">我是定宽´ ▽ ` )ノ</div> 27 <div id="d2">我也是定宽呢╮( ̄▽ ̄)╭</div> 28 <div id="d3">我是自适应的(ˊ_>ˋ)</div> 29 </div> 30 </body> 31 </html> 32 33 34 ie不兼容placeholder是的hacker 35 $('#check').focus(function() { 36 var val = $(this).val(); 37 if(val=='如不愿透漏姓名,可留下姓氏,方便我们联系'){$(this).val('');$(this).css('color','#000'); 38 } 39 }).blur(function() { 40 var val = $(this).val(); 41 if(val==''){ $(this).val('如不愿透漏姓名,可留下姓氏,方便我们联系'); 42 $(this).css('color','#aaa'); 43 } 44 });