为什么空间用于在css中分隔事物 [英] Why are spaces used to separate things in css

查看:83
本文介绍了为什么空间用于在css中分隔事物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是在一个wordpress样式表,我不明白的东西:

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;现在他们是用空格分隔的,这是否意味着如果一个blockquote标签被嵌入到一个cite标签,它会得到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;"?

谢谢。

推荐答案

这个空间被称为 descendant combinator blockquote cite blockquote 元素中选择任何 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.

换句话说,它不是如果一个blockquote标签嵌入到一个引用标签,这是另一种方式(此外,你不能把 blockquote 放在 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 blockquotes in cites in the first place).

正如你所注意到的,逗号组选择器序列到同一个规则。

As you note, commas group selector sequences into the same rule.

这篇关于为什么空间用于在css中分隔事物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆