css在 IE8下的兼容性(常用偽類、超鏈接圖片藍框,圖片間隙)


常用偽類選擇器

 

  IE7 IE8 IE9
:hover
:focus ×
:first-child
:last-child × ×
:first-of-type × ×
:last-of-type × ×
:nth-child(n) × ×
:nth-last-child(n) × ×
:nth-of-type(n) × ×
:nth-last-of-type(n) × ×
:enabled × ×
:disabled × ×
:checked × ×

 

 兼容寫法:

選中第三個p標簽: 

div p:first-child+p+p{...}

以此類推,以上所有偽類都可以兼容到。

優先級:偽類選擇器>class選擇器

1. 超鏈接圖片有藍框

a{
border:none;
}

2. 圖片間隙

img{
display:block;
}

3. 圖片或元素聚焦后的虛線框

img{
outline:none;
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM