Why are spaces used to separate things in css(为什么在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;"现在它们用空格分隔,这是否意味着如果将块引用标签嵌入到引用标签中,它将得到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
元素内的任何 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
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).
如您所见,逗号将选择器序列分组到同一规则中.
As you note, commas group selector sequences into the same rule.
这篇关于为什么在css中使用空格分隔事物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么在css中使用空格分隔事物


- 400或500级别的HTTP响应 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- Fetch API 如何获取响应体? 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01