css二级联动_CSS级联

css二级联动

Cascade is a fundamental concept of CSS. After all, it’s in the name itself, the first C of CSS - Cascading Style Sheets - it must be an important thing.

级联是CSS的基本概念。 毕竟,它的名字本身就是CSS的第一个C语言-级联样式表-它必须是一件重要的事情。

What does it mean?

这是什么意思?

Cascade is the process, or algorithm, that determines the properties applied to each element on the page.

级联是确定应用于页面上每个元素的属性的过程或算法

Trying to converge from a list of CSS rules that are defined in various places.

尝试从各地定义CSS规则列表中收敛。

It does so taking in consideration:

这样做时考虑到:

It also takes care of resolving conflicts.

它还负责解决冲突。

Two or more competing CSS rules for the same property applied to the same element need to be elaborated according to the CSS spec, to determine which one needs to be applied.

需要根据CSS规范为适用于同一元素的相同属性制定两个或两个以上竞争CSS规则,以确定需要应用哪个。

Even if you just have one CSS file loaded by your page, there is other CSS that is going to be part of the process. We have the browser (user agent) CSS. Browsers come with a default set of rules, all different between browsers.

即使您的页面仅加载了一个CSS文件,其他CSS也将成为该过程的一部分。 我们有浏览器(用户代理)CSS。 浏览器带有一组默认规则,所有浏览器之间都有所不同。

Then your CSS come into play.

然后您CSS开始发挥作用。

Then the browser applies any user stylesheet, which might also be applied by browser extensions.

然后,浏览器将应用任何用户样式表,浏览器扩展也可能会应用该样式表。

All those rules come into play while rendering the page.

所有这些规则在呈现页面时都会起作用。

翻译自: https://flaviocopes.com/css-cascade/

css二级联动

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值