問題描述
這是我不理解的 wordpress 樣式表中的一些內(nèi)容:
Here is something in a wordpress stylesheet that I don't understand:
blockquote cite,
blockquote em,
blockquote i {
font-style: normal;
}
blockquote 和 cite 之間的空格有什么作用?我知道如果它們用逗號分隔,那么 blockquote 和 cite 都會有 "font-style: normal;"現(xiàn)在它們用空格分隔,這是否意味著如果將塊引用標(biāo)簽嵌入到引用標(biāo)簽中,它將得到font-style: normal;"?
what does the space between blockquote and cite do? I understand if they are separated by a comma, then both blockquote and cite will have "font-style: normal;" now they are separated by space, does this mean if a blockquote tag is embedded into a cite tag it will get "font-style: normal;"?
謝謝.
推薦答案
空間被稱為 后代組合器.blockquote cite
選擇 blockquote
元素內(nèi)的任何 cite
元素.blockquote em
和 blockquote i
也是如此.
The space is known as the descendant combinator. blockquote cite
selects any cite
element within a blockquote
element. Likewise for blockquote em
and blockquote i
.
換句話說,這不是如果將塊引用標(biāo)簽嵌入到引用標(biāo)簽中",而是相反(此外,您不能將 blockquote
s 放在 cite
s 放在首位).
In other words, it's not "if a blockquote tag is embedded into a cite tag", it's the other way around (besides, you can't place blockquote
s in cite
s in the first place).
如您所見,逗號將選擇器序列分組到同一規(guī)則中.
As you note, commas group selector sequences into the same rule.
這篇關(guān)于為什么在css中使用空格分隔事物的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!