久久久久久久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)嗎?)
主站蜘蛛池模板: 中文一区 | 国产精品视频久久 | 天天操天天射天天 | 性色网站| 国产一区二区三区色淫影院 | 99精品99| 2018天天干天天操 | 午夜影院在线观看视频 | 人人爽人人草 | 久久久久久久久久久久久久久久久久久久 | 亚洲国产成人一区二区 | 国内毛片毛片毛片毛片 | 一级毛毛片 | 激情在线视频网站 | 国产男女猛烈无遮掩视频免费网站 | 亚洲精品久久久一区二区三区 | 久久久久久久国产精品影院 | 仙人掌旅馆在线观看 | 日韩精品成人免费观看视频 | 久久久91精品国产一区二区三区 | 中文字幕一区二区三区日韩精品 | 欧洲视频一区二区 | 91av免费看 | 91福利影院 | 有码在线| 欧美在线一区二区三区 | 91美女在线观看 | 欧美一级黄色片免费观看 | 国产精品一区二区久久 | 中文字幕99| 日本在线免费视频 | 99久久精品免费看国产四区 | 黄色网毛片 | 精品日韩 | 日韩欧美久久精品 | 国产视频二区 | 最新国产精品视频 | 国产日韩欧美激情 | 亚欧精品一区 | 亚洲精品视频在线观看视频 | 欧美亚洲另类在线 |