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.
换句话说,这不是如果将块引用标签嵌入到引用标签中",而是相反(此外,您不能将 blockquotes 放在 cites 放在首位).
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中使用空格分隔事物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么在css中使用空格分隔事物
基础教程推荐
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
