导航栏: 首页 评论列表

IE的Bug (IE7,IE8)

默认分类 2011-03-23 02:28:34

发两个IE的bug,希望能给不小心"掉坑里"的朋友一点帮助.
1.IE7下text-indent表现异常;
2.IE7,IE8下input继承font-family异常.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
  2. <html xmlns="http://www.w3.org/1999/xhtml">  
  3.   
  4. <head>  
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  6. <title>Untitled 1</title>  
  7. <style type="text/css">  
  8. .dropdown{font-family:Dotum;}  
  9. .dropdown input{width:213px;height:22px;text-indent:30px;}  
  10. </style>  
  11. </head>  
  12.   
  13. <body>  
  14. <div style="background-color:#666666">  
  15.     <div id="dropDownList1" class="dropdown" style="display:inline;">  
  16.         <input type="text" style="" value="789" />   
  17.     </div>  
  18. </div>  
  19.   
  20. </body>  
  21.   
  22. </html>  


解决方案:
1.<span style="display:none">&nbsp;</span>加在<div id="dropDownList1" class="dropdown" style="display:inline;">前面即可;
2.font-family直接加在input上,.dropdown input{width:213px;height:22px;text-indent:30px;font-family:'\5B8B\4F53';}


>> 留言评论