IE 8兼容小妙招~~
生活随笔
收集整理的這篇文章主要介紹了
IE 8兼容小妙招~~
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
IE6/7下多種方法移除button、input 默認(rèn)邊框和去掉焦點(diǎn)線
button、input 默認(rèn)邊框和焦點(diǎn)線確實(shí)影響美觀,下面為大家講解下IE6/7下下如何去掉邊框、焦點(diǎn)線,具體的實(shí)現(xiàn)如下,感興趣的朋友可以參考下
一、去掉邊框:
看看基本的HTML:
<div class="wrap">
<input type="text" class="input_txt">
<input type="submit" value="submit" class="input_btn">
<input type="button" value="提交" class="input_btn">
<div>
通常解決這樣的bug最好的方法就是在button和input的標(biāo)簽外添加一個(gè)標(biāo)簽,然后將樣式寫在這個(gè)標(biāo)簽上,并且把button和input的默認(rèn)樣式都去除掉。
實(shí)現(xiàn)方式一:設(shè)置CSS:
<style type="text/css">
input{margin:0;padding:0;}
.wrap{background-color:#0f0;}
.input_txt,.input_btn{border:0 none;}
</style>
實(shí)現(xiàn)方式二:設(shè)置CSS,并使用濾鏡:
<!--[if IE]>
<style type="text/css">
input{margin:0;padding:0;filter:chroma(color=#000000);border:none; }
.wrap{background-color:#0f0;}
</style>
<![endif]-->
此種方式貌似會(huì)有點(diǎn)問題!待在真實(shí)IE7環(huán)境中驗(yàn)證。
二、去掉焦點(diǎn)線:
<style type="text/css">
a:focus, *:focus {noFocusLine: expression(this.onFocus=this.blur());}
</style>
轉(zhuǎn)載于:https://www.cnblogs.com/lianer88/p/10022329.html
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的IE 8兼容小妙招~~的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: leetcode396. Rotate
- 下一篇: 【mongodb用户和身份认证管理】