久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

CSS3:未經(jīng)檢查的偽類

CSS3 :unchecked pseudo-class(CSS3:未經(jīng)檢查的偽類)
本文介紹了CSS3:未經(jīng)檢查的偽類的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問題描述

我知道有一個(gè)官方的 CSS3 :checked 偽類,但是有沒有一個(gè) :unchecked 偽類,它們有相同的瀏覽器支持嗎?

I know there is an official CSS3 :checked pseudo-class, but is there an :unchecked pseudo-class, and do they have the same browser support?

Sitepoint 的參考資料 沒有提到,但是這個(gè) whatwg 規(guī)范(不管是什么)的作用.

Sitepoint's reference doesn't mention one, however this whatwg spec (whatever that is) does.

我知道將 :checked:not() 偽類結(jié)合起來(lái)可以達(dá)到相同的結(jié)果,但我還是很好奇:

I know the same result can be achieved when the :checked and :not() pseudo-classes are combined, but i'm still curious:

input[type="checkbox"]:not(:checked) {
    /* styles */
}

w3c 推薦相同的技術(shù)

The w3c recommends the same technique

可以使用否定偽類來(lái)選中未選中的復(fù)選框:

An unchecked checkbox can be selected by using the negation pseudo-class:

:not(:checked)

推薦答案

:unchecked 沒有定義在 Selectors 或 CSS UI level 3 specs 中,也沒有出現(xiàn)在 Level 4 Selectors 中.

:unchecked is not defined in the Selectors or CSS UI level 3 specs, nor has it appeared in level 4 of Selectors.

事實(shí)上,W3C 的引用取自 Selectors 4 規(guī)范.由于 Selectors 4 建議使用 :not(:checked),因此可以安全地假設(shè)沒有對(duì)應(yīng)的 :unchecked 偽.:not():checked 的瀏覽器支持是相同的,所以這應(yīng)該不是問題.

In fact, the quote from W3C is taken from the Selectors 4 spec. Since Selectors 4 recommends using :not(:checked), it's safe to assume that there is no corresponding :unchecked pseudo. Browser support for :not() and :checked is identical, so that shouldn't be a problem.

這似乎與 :enabled:disabled 狀態(tài)不一致,尤其是因?yàn)橐粋€(gè)元素既不啟用也不禁用(即語(yǔ)義完全不適用),但是對(duì)于這種不一致似乎沒有任何解釋.

This may seem inconsistent with the :enabled and :disabled states, especially since an element can be neither enabled nor disabled (i.e. the semantics completely do not apply), however there does not appear to be any explanation for this inconsistency.

(:indeterminate 不計(jì)算在內(nèi),因?yàn)橐粋€(gè)元素同樣不能是未檢查、檢查或不確定的,因?yàn)檎Z(yǔ)義不適用.)

(:indeterminate does not count, because an element can similarly be neither unchecked, checked nor indeterminate because the semantics don't apply.)

這篇關(guān)于CSS3:未經(jīng)檢查的偽類的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

:hover:before text-decoration none has no effects?(:hover:before text-decoration none 沒有效果?)
Is CSS faster when you are specific?(當(dāng)您特定時(shí),CSS 會(huì)更快嗎?)
CSS sibling selectors (select all siblings)(CSS 兄弟選擇器(選擇所有兄弟))
IE: nth-child() using odd/even isn#39;t working(IE:使用奇數(shù)/偶數(shù)的 nth-child() 不起作用)
How can I tell if an element is in a shadow DOM?(如何判斷一個(gè)元素是否在影子 DOM 中?)
Can I use CSS to add a bullet point to any element?(我可以使用 CSS 為任何元素添加項(xiàng)目符號(hào)嗎?)
主站蜘蛛池模板: 天天干天天操天天爽 | 国产精品18毛片一区二区 | 中文字幕在线一区 | 欧美日韩国产在线 | 精品国产不卡一区二区三区 | 在线一区| 日韩福利 | 国产成在线观看免费视频 | 国产精品乱码一区二区三区 | 91不卡| 天天干在线播放 | 激情欧美一区二区三区 | 妞干网av| 国产精品久久午夜夜伦鲁鲁 | 九九久久99 | 97碰碰碰| 久草久草久草 | 亚洲va欧美va人人爽午夜 | 久久久久亚洲精品国产 | 精品国产第一区二区三区 | 久久国产99 | 日韩成人在线观看 | 91精品国产91久久久久久 | 99视频在线免费观看 | 99爱在线免费观看 | 精品国产一区二区三区久久 | 免费簧片视频 | 美女黄色在线观看 | 高清一区二区三区 | 91看片在线观看 | 欧美在线观看一区 | 亚洲国产欧美一区 | 美女黄视频网站 | 97日日碰人人模人人澡分享吧 | 在线视频91 | 亚洲免费在线 | 99在线免费观看 | 羞羞视频免费观看 | 亚洲a在线观看 | 免费国产视频 | 蜜桃传媒一区二区 |