English 中文(简体)
当在一个规则集中宣布同一公司财产中的两个时,浏览器是否使两者都成为可能?
原标题:When declaring two of the same CSS properties in one rule set, does the browser render both?
  • 时间:2012-04-26 13:00:20
  •  标签:
  • css
  • browser

如果需要为不支持您可能使用的财产的浏览器提供退款,则在一则规则中使用相同的中央支助事务财产:

body{
    background: rgb(255, 255, 255);
    background: rgba(255, 255 ,255, 0.5);
}

了解这两项声明的浏览者是否首先放弃了,然后又推翻了第二项声明? 或者,浏览器能拯救自己,只能使 has子变成??

Edit:我知道,如果浏览器理解两种声明,就会使声明成为声明,但我想知道,浏览器是否首先使/否决成为一种意见,然后用第二次取代,或者浏览器的工作方式只能使一项声明成为必要的声明,从而有可能节省资源?

最佳回答

我期望现代(很可能是老的)浏览器在做任何事情之前将提供给它的安保部规则加以规范。 此处从 Chrome的简介中抽取两条规则:

“entergraph

这里还有一条规则:

“entergraph

如你所知,在存在两种不同的规则时,没有采取额外的步骤。 如果浏览器要翻两番,就会看到另一个“灯”。 (单一规则的油漆时间略有减少,可能是因为我删除了<条码>rgba规则,因此浏览器不必考虑到透明度。)

问题回答

其中最后一项适用

To be more precise: the first will be applied, then the second. It would be the same as having 2 identical selectors setting the background property. The one most descriptive will be applied. If they are the same, the last declared will be the one applied.

《社会保障法》中的“C”指“CSS”规则之前的风格可以添加或超标。 因此,第二项声明将优先于第一项。

浏览器正确处理。 你们可以使用这种规则。

例如,神学院将采用“rg”,国际能源8将采用“rg”。

浏览器一般适用以下算法:

for each element in the DOM tree
    for each CSS rule
        if rule s selector matches element
            apply all declarations in rule
render

http://www.ohchr.org。

for each CSS rule
    for each element in DOM tree
        if rule s selector matches element
            for each declaration in rule
                apply declaration
                render

这将是一个巨大的业绩问题。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签