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

忽略 Firefox 中特定于 Webkit 的 CSS 選擇器

Ignoring Webkit-specific CSS selector in Firefox(忽略 Firefox 中特定于 Webkit 的 CSS 選擇器)
本文介紹了忽略 Firefox 中特定于 Webkit 的 CSS 選擇器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在開發(fā)一個 jQuery 主題,其中包含盡可能多的表單元素的樣式.最初它是為 Webkit (Chrome) 開發(fā)的.現(xiàn)在我想讓它也適用于 Firefox.

I'm working on a jQuery theme which includes styling for as many form elements as possible. Initially it was developed for Webkit (Chrome). Now I want to make it work with Firefox as well.

問題是;Firefox 在某些特定于 Webkit 的語法方面存在問題.

Problem is; Firefox has problems with some Webkit-specific syntax.

例如:

input[type="range"]::-webkit-slider-thumb,
input[type=radio],
input[type=checkbox] {
    -webkit-appearance: none !important;
    -moz-appearance: none;
    width: 1.2em;
    height: 1.2em;
    border: 1px solid black;
    background: #666666 url(images/ui-bg_highlight-soft_50_666666_1x100.png) 50% 50% repeat-x;
}

問題在于 input[type="range"]::-webkit-slider-thumb, 位.刪除它,F(xiàn)irefox 就可以正常工作了.它還對其他語法如 ::-webkit-file-upload-button::selection 和所有其他使用 ::-webkit- 的東西執(zhí)行此操作... 標(biāo)簽.它可以識別自己的 ::-moz-... 標(biāo)簽,例如 ::-moz-selection 就好了.

The problem is the input[type="range"]::-webkit-slider-thumb, bit. Remove it and Firefox works fine. It also does this for other syntax like ::-webkit-file-upload-button, ::selection and all other things using the ::-webkit-... labels. It recognizes it's own ::-moz-... labels, like ::-moz-selection just fine though.

Webkit 似乎只是忽略了 ::-moz- 標(biāo)簽.

Webkit seems to just ignore the ::-moz- labels.

有沒有什么方便的方法讓 Firefox 忽略 ::-webkit-... 標(biāo)簽或以其他方式處理這個問題,而不必維護每個 CSS 塊的多個副本?

Is there any convenient way to make Firefox ignore the ::-webkit-... labels or otherwise deal with this problem without having to maintain multiple copies of every CSS block?

使用最新版本的 Chrome 和 Firefox.

Using freshly updated versions of Chrome and Firefox.

推薦答案

不幸的是,不復(fù)制聲明塊是不可能的,因為 CSS 規(guī)范規(guī)定瀏覽器在遇到 CSS 規(guī)則中無法識別的選擇器時必須這樣做:

Unfortunately, it's not possible without duplicating the declaration blocks, as the CSS spec stipulates that browsers must behave this way when encountering unrecognized selectors in CSS rules:

選擇器包含(但不包括)第一個左花括號 ({) 之前的所有內(nèi)容.選擇器總是與 {} 塊一起使用.當(dāng)用戶代理無法解析選擇器(即,它不是有效的 CSS3)時,它必須 忽略 {} 塊.

The selector consists of everything up to (but not including) the first left curly brace ({). A selector always goes together with a {}-block. When a user agent can't parse the selector (i.e., it is not valid CSS3), it must ignore the {}-block as well.

在這種情況下,一個供應(yīng)商的瀏覽器無法識別另一個供應(yīng)商的前綴,因此它必須忽略該規(guī)則.

In this case, it's one vendor's browser being unable to recognize another vendor's prefixes, so it has to ignore the rule.

這篇關(guān)于忽略 Firefox 中特定于 Webkit 的 CSS 選擇器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

CSS selector when :target empty(:target 為空時的 CSS 選擇器)
Does the CSS direct decendant (gt;) not have any value in selectivity?(CSS 直接后代 (gt;) 在選擇性方面沒有任何價值嗎?)
Using querySelectorAll(). Is the result returned by the method ordered?(使用 querySelectorAll().方法返回的結(jié)果是否有序?)
Safari bug :first-child doesn#39;t update display:block when items are removed with JS(Safari 錯誤:當(dāng)使用 JS 刪除項目時,first-child 不更新 display:block)
nth-Child CSS selectors(nth-子 CSS 選擇器)
Using same ID for multiple HTML tags?(對多個 HTML 標(biāo)簽使用相同的 ID?)
主站蜘蛛池模板: 天天干夜夜拍 | 99在线精品视频 | 久久91精品国产 | 久久精品国产一区 | 精品欧美黑人一区二区三区 | av成年人网站 | 欧州一区二区三区 | 久久久久久久久久久成人 | 中文无吗 | 午夜精品久久久久久久久久久久 | 久久大陆| 日韩五月天 | 欧美jizzhd精品欧美巨大免费 | 国产精品国产成人国产三级 | 黄在线免费观看 | 特黄毛片 | h视频免费观看 | 久久久久久久久久一区 | 亚洲色图综合网 | 黄色香蕉视频在线观看 | 国产一区二区在线观看视频 | 特级毛片www | 五月花丁香婷婷 | 国产精品免费一区二区三区四区 | 国产91av视频 | 亚洲免费人成在线视频观看 | 无码日韩精品一区二区免费 | 中文字幕av网站 | 美女一区| 午夜在线精品偷拍 | 国产在线中文 | 欧美bondage紧缚视频 | 久久精彩视频 | 亚洲精彩免费视频 | 国产精品久久久久久婷婷天堂 | 黑人巨大精品欧美一区二区免费 | 91人人视频在线观看 | 国产女人与拘做受视频 | 亚洲福利视频网 | www.久久久久久久久久久久 | 在线视频一区二区三区 |