css样式问题,火狐浏览器不兼容,其他浏览器显示正常,请问如何兼容火狐呢,谢谢!!!!

.header .logo{ font-size: 20px; line-height: 45px;}.search_box .txt { background: none; border: none; font: 1rem/1.5rem STXihei; color: #999; -webkit-box-flex: 1; display: -webkit-box; margin-left: 16px; }.search_c { width: 70%; display: table; padding: 4px 0; height: 24px; border-radius: 25px; display: inline-block; position: relative; text-align: left; background: #ffffff; }.search_Btn { background: none; position: absolute; right: 15px; top: 6px; border: 0; width: 30px; height: 22px; background: #ffffff url(../images/search_ico.png) no-repeat; background-size: 30px 22px; }页面: <div class="search_box"> <div class="logo"> <div class="search_c"> <form id="form1" name="form1" action=""> <label for="textfield"></label> <input name="keyword" type="text" class="txt" id="keyword" placeholder="搜索你关注的名称" onfocus="javascript:this.value = ''"> <input type="submit" name="button" value="" class="search_Btn btn" title="点击搜索"> </form> </div></div> </div>

用这个标签:!important

!important只有Ie7.0和firefox可以识别,但是Ie6.0不能成功应用.

(1)区别ie与firefox的hack为:

border:2px solid #f00;

*border:1px solid #f00;

(2)区别Ie6.0 与Ie7.0、firefox的hack为:

border:1px solid #f00!important;

border:2px solid #f00;
温馨提示:内容为网友见解,仅供参考
第1个回答  2016-06-16
给input设置line-height本回答被提问者采纳
相似回答