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

選擇器部分和部分的正確術(shù)語和單詞

Correct terms and words for sections and parts of selectors(選擇器部分和部分的正確術(shù)語和單詞)
本文介紹了選擇器部分和部分的正確術(shù)語和單詞的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

用逗號分隔的 CSS 選擇器部分的正確術(shù)語是什么?

What is the correct term for the sections of CSS selectors that are separated by commas?

    body.foo .login , body.bar .login { ... }
/*                  |
           Part 1   |  Part 2         */

在這些部分中,由組合符分隔的部分(空格、+> 等)的術(shù)語是什么?

Within those sections, what is the term for the parts separated by combinators (spaces, +, >, etc)?

    body.foo .login , ... { ... }
/*          |
   Part 1   |   Part 2    */

推薦答案

用逗號分隔的 CSS 選擇器部分的正確術(shù)語是什么?

What is the correct term for the sections of CSS selectors that are separated by commas?

這些被稱為復雜選擇器.整個以逗號分隔的列表稱為選擇器列表.

在這些部分中,由組合符分隔的部分(空格、+> 等)的術(shù)語是什么?

Within those sections, what is the term for the parts separated by combinators (spaces, +, >, etc)?

這些被稱為 復合選擇器.

These are known as compound selectors.

因此,選擇器列表由一個或多個用逗號分隔的復雜選擇器組成,每個復雜選擇器由兩個主要部分組成:復合選擇器和組合器.它還可以選擇包含偽元素.

So, a selector-list is made up of one or more complex selectors separated by commas, and each complex selector is made up of two main parts: compound selectors, and combinators. It can also optionally contain pseudo-elements.

復合選擇器曾經(jīng)有一個相當復雜的名稱簡單選擇器序列".更糟糕的是,復雜的選擇器只是被稱為選擇器".不用說,我建議使用新術(shù)語,因為與它們的前輩相比,它們更直接、更簡潔且完全不含糊.

Compound selectors used to have the rather convoluted name "sequence of simple selectors". Worse still, complex selectors were just called "selectors". Needless to say, I recommend using the new terms as they are much more straightforward, much less cumbersome and completely unambiguous compared to their predecessors.

既然我在這里,這里是其余的定義......

And since I'm here, here are the rest of the definitions...

  • 簡單的選擇器是選擇器的基本組成部分.它是以下任何一種:

  • A simple selector is one fundamental component of selectors. It is any one of the following:

  • 通用選擇器 (*),可選地帶有命名空間
  • 類型選擇器(adivspanulli等),可選地使用命名空間
  • 屬性選擇器([att][att=val] 等)、可選的命名空間
  • 類選擇器(.class)
  • ID 選擇器 (#id)
  • 偽類(:偽類)
  • Universal selector (*), optionally with a namespace
  • Type selector (a, div, span, ul, li, etc), optionally with a namespace
  • Attribute selector ([att], [att=val], etc), optionally with a namespace
  • Class selector (.class)
  • ID selector (#id)
  • Pseudo-class (:pseudo-class)

如上所述,復合選擇器(以前稱為簡單選擇器序列")是不由組合器分隔的簡單選擇器鏈:

As answered above, a compound selector (formerly a "sequence of simple selectors") is a chain of simple selectors not separated by a combinator:

a:not([rel="external"]):hover

  • 組合器是選擇器的另一個基本組成部分.它是分隔兩個復合選擇器的符號或標記,在其位置建立由兩個復合選擇器表示的兩個元素之間的關(guān)系.目前有四種組合器在使用:

  • A combinator is another fundamental component of selectors. It is a symbol or token that separates two compound selectors, establishing in its place a relationship between the two elements represented by the two compound selectors. There are currently four combinators in use today:

    • 后代組合子:

    • Descendant combinator:

    article p
    

  • 子組合子:

  • Child combinator:

    /* 
     * The extra spaces in between are whitespace,
     * and are therefore insignificant.
     */
    ul > li
    

  • 相鄰兄弟組合子:

  • Adjacent sibling combinator:

    header + section
    

  • 通用兄弟組合子:

  • General sibling combinator:

    h2 ~ p
    

  • 更多的組合子可能會在以后的規(guī)范中引入.

    More combinators may be introduced in later specifications.

    復合選擇器(以前只是選擇器")是由組合器鏈接的復合選擇器組成的完整字符串:

    And a complex selector (formerly just "selector") is a complete string made up of compound selectors linked by combinators:

    nav[role="main"] > ul:first-child > li
    

  • 復合選擇器的主題是它的最后一個或唯一的復合選擇器,表示將被匹配或設(shè)置樣式的元素.在上面的例子中,選擇器的主題是 li.

  • The subject of a complex selector is its last, or only, compound selector, representing the element that will be matched or styled. In the above example, the subject of the selector is li.

    術(shù)語 selector 已被概括,因此為了簡單明了,它現(xiàn)在可以指代以下任何一個,以及它指的是哪個to 在任何給定時刻都應該從上下文中收集:

    The term selector has been generalized, so it may now refer to any of the following for the purposes of simplicity and brevity, and which one it's referring to at any given moment should be gleaned from context:

    • 簡單的選擇器
    • 復合選擇器
    • 復雜選擇器
    • 選擇器列表(例如樣式規(guī)則的選擇器"組件)

    一些個人筆記:

    • 術(shù)語鍵選擇器"是瀏覽器供應商創(chuàng)造的,用于選擇器實現(xiàn),并不是一個官方術(shù)語.然而,它通常用于表示選擇器的主題",因為實現(xiàn)碰巧使用選擇器的主題作為確定匹配的關(guān)鍵.

    • The term "key selector" was coined by browser vendors for use with selector implementations, and is not an official term. It is often used to mean "subject of the selector" however, because implementations happen to use the subject of the selector as the key for the purposes of determining matches.

    pseudo-selector"這個詞是作者為了混合偽類和偽元素而創(chuàng)造的,它不是一個官方的,也不是真正有意義的術(shù)語.盡管您可以在一些早期的 W3C CSS2/3 草案中找到它,但這可能是一個錯誤.請不要使用這個詞,因為它不必要地創(chuàng)建試圖將兩個完全不同的概念歸為一個總稱來混淆.

    The term "pseudo-selector" was coined by authors to mix pseudo-classes and pseudo-elements, and is not an official, or indeed meaningful, term. Although you can find it in some early-stage W3C CSS2/3 drafts, that was probably a mistake. Please don't use this term, as it needlessly creates confusion by attempting to group two completely different concepts into a single umbrella term.

    偽元素(::pseudo-element)不是簡單的選擇器,因此不能出現(xiàn)在只能匹配實際元素的地方.但是,出于 CSS 解析的目的,它們?nèi)员灰暈檫x擇器,并且如上所述,目前可以出現(xiàn)在列表中任何復雜選擇器的末尾(即,在每個復雜選擇器的最后一個或唯一一個復合選擇器的末尾).

    Pseudo-elements (::pseudo-element) are not simple selectors, and therefore cannot appear in places where only actual elements may be matched. However, they are still considered selectors for the purposes of CSS parsing, and as stated above currently can appear at the end of any complex selector in a list (i.e. at the end of the last, or only, compound selector of each complex selector).

    在 CSS 中,一個典型的樣式規(guī)則(以前稱為規(guī)則集")由一個選擇器和一個聲明塊組成.

    In CSS, a typical style rule (formerly "ruleset") consists of a selector and a declaration block.

    命名空間前綴本身不是選擇器,但它們可以應用于類型選擇器、通用選擇器和屬性選擇器,以匹配文檔中已(或未)命名空間的組件.

    Namespace prefixes are not selectors in their own right, but they may be applied to type selectors, universal selectors and attribute selectors to match components in a document that are (or are not) namespaced.

    選擇器的特異性目前僅指一個復雜的選擇器.匹配規(guī)則時,列表中與給定元素匹配的任何復雜選擇器都將被考慮用于特異性計算.如果多個復雜選擇器與一個元素匹配,則將使用最具體的選擇器進行計算.

    The specificity of a selector currently only refers to that of a single complex selector. When matching rules, any of the complex selectors in a list that match a given element will be considered for specificity calculations. If more than one complex selector matches an element, the most specific one will be used for calculations.

    對于某些 4 級選擇器,特異性將是一個更復雜的問題,例如 :is() 和增強的 :not(),以及 of增強的 :nth-child() 偽中的 S 表示法.

    Specificity will be a more complicated issue with some level 4 selectors, such as :is() and the enhanced :not(), and the of S notation in the enhanced :nth-child() pseudo.

    這篇關(guān)于選擇器部分和部分的正確術(shù)語和單詞的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

    Style every third element?(每隔三個元素設(shè)置樣式?)
    Why shouldn#39;t I use ID selectors in CSS?(為什么我不應該在 CSS 中使用 ID 選擇器?)
    What does img[class*=quot;alignquot;] mean in CSS?(CSS 中的 img[class*=“align] 是什么意思?)
    CSS: Last element on line(CSS:最后一個元素)
    How do I select every other div class element using just CSS (no js)(如何僅使用 CSS(無 js)選擇所有其他 div 類元素)
    Tool for checking unused CSS selectors?(檢查未使用的 CSS 選擇器的工具?)
    主站蜘蛛池模板: aaa在线观看 | 在线一区 | 欧美中文一区 | h视频在线免费 | 国产 日韩 欧美 在线 | 免费黄色录像片 | 国产精品毛片一区二区在线看 | 午夜精品 | 国产在线观看一区二区三区 | 黄色毛片免费视频 | 国产精品久久一区二区三区 | 精品欧美乱码久久久久久 | 日韩中文字幕 | 亚洲视频精品 | 神马福利 | 国产真实乱对白精彩久久小说 | 青青草一区二区三区 | a视频在线观看 | 日本视频一区二区三区 | 国产精品久久久久一区二区三区 | 狠狠色综合欧美激情 | 日韩一区二区三区精品 | 日日淫 | 午夜激情在线 | 国产乱性| 午夜极品| 日韩av在线免费 | 亚洲精品久久 | www久| 亚洲天堂免费 | 免费永久av | 亚洲视频在线观看 | 成人免费福利 | 国产高潮好爽受不了了夜夜做 | 国产视频久久 | 国产在线精品一区二区 | 亚洲日本欧美日韩高观看 | 精品在线一区二区 | 成人av播放 | 欧美成人a∨高清免费观看 色999日韩 | 久久久久久精 |