<bdo id='77623'></bdo><ul id='77623'></ul>

  • <i id='77623'><tr id='77623'><dt id='77623'><q id='77623'><span id='77623'><b id='77623'><form id='77623'><ins id='77623'></ins><ul id='77623'></ul><sub id='77623'></sub></form><legend id='77623'></legend><bdo id='77623'><pre id='77623'><center id='77623'></center></pre></bdo></b><th id='77623'></th></span></q></dt></tr></i><div id='77623'><tfoot id='77623'></tfoot><dl id='77623'><fieldset id='77623'></fieldset></dl></div>

    <legend id='77623'><style id='77623'><dir id='77623'><q id='77623'></q></dir></style></legend>

      <small id='77623'></small><noframes id='77623'>

      <tfoot id='77623'></tfoot>

        CSS 属性选择器 + 后代在 Webkit 中出现错误?

        时间:2023-09-08

        <small id='Ydkih'></small><noframes id='Ydkih'>

            <tbody id='Ydkih'></tbody>
            <bdo id='Ydkih'></bdo><ul id='Ydkih'></ul>
              <legend id='Ydkih'><style id='Ydkih'><dir id='Ydkih'><q id='Ydkih'></q></dir></style></legend>

              <tfoot id='Ydkih'></tfoot>
            • <i id='Ydkih'><tr id='Ydkih'><dt id='Ydkih'><q id='Ydkih'><span id='Ydkih'><b id='Ydkih'><form id='Ydkih'><ins id='Ydkih'></ins><ul id='Ydkih'></ul><sub id='Ydkih'></sub></form><legend id='Ydkih'></legend><bdo id='Ydkih'><pre id='Ydkih'><center id='Ydkih'></center></pre></bdo></b><th id='Ydkih'></th></span></q></dt></tr></i><div id='Ydkih'><tfoot id='Ydkih'></tfoot><dl id='Ydkih'><fieldset id='Ydkih'></fieldset></dl></div>

                  本文介绍了CSS 属性选择器 + 后代在 Webkit 中出现错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  考虑一下这个 CSS:

                  Consider this CSS:

                  [data-color="red"] h1 {
                  background-color:red;
                  }
                  
                  [data-color="blue"] h1 {
                  background-color:blue;
                  }
                  

                  还有这个 HTML:

                  <div data-color="red">
                  <h1>red</h1>
                  </div>
                  
                  <div data-color="blue">
                  <h1>blue</h1>
                  </div>
                  
                  <div data-color="blue">
                  <h1>blue</h1>
                  </div>
                  

                  现在看一下上面代码在 Webkit 和任何其他浏览器中的以下演示:
                  http://jsfiddle.net/aUCkn/

                  Now take a look at the following demo of the above code in Webkit and any other browser:
                  http://jsfiddle.net/aUCkn/

                  奇怪的是,如果你把每个 h1 放在同一行,即:

                  What's strange is that if you put each h1 on the same line, i.e.:

                  <div data-color="red"><h1>red</h1>
                  </div>
                  
                  <div data-color="blue"><h1>blue</h1>
                  </div>
                  
                  <div data-color="blue"><h1>blue</h1>
                  </div>
                  

                  它也适用于 Webkit:
                  http://jsfiddle.net/aUCkn/1/

                  It works in Webkit too:
                  http://jsfiddle.net/aUCkn/1/

                  有人知道这是从哪里来的吗?是我做错了什么还是 Webkit 在这里表现得很愚蠢?

                  Does anyone know where this comes from? Am I doing something wrong or is Webkit acting stupid here?

                  推荐答案

                  第一个 jsFiddle 在我的 Chrome 12.0.742.112 (stable) 中坏了.

                  The first jsFiddle is broken in my Chrome 12.0.742.112 (stable).

                  但是,它适用于我的 Chrome 14.0.803.0 dev-m.

                  However, it works in my Chrome 14.0.803.0 dev-m.

                  因此,他们已经意识到并修复了该错误.您只需等待修复程序进入稳定频道即可.

                  So, they're already aware of and have fixed the bug. You just have to wait for the fix to land in the stable channel.

                  如果存在错误报告,我将尝试查找错误报告的链接.

                  I'll try to find a link to a bug report, if one exists.

                  这篇关于CSS 属性选择器 + 后代在 Webkit 中出现错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何删除 D3.js 中的属性? 下一篇:JavaScript Element.value 与 Element.getAttribute("value

                  相关文章

                  最新文章

                  <i id='7GzAD'><tr id='7GzAD'><dt id='7GzAD'><q id='7GzAD'><span id='7GzAD'><b id='7GzAD'><form id='7GzAD'><ins id='7GzAD'></ins><ul id='7GzAD'></ul><sub id='7GzAD'></sub></form><legend id='7GzAD'></legend><bdo id='7GzAD'><pre id='7GzAD'><center id='7GzAD'></center></pre></bdo></b><th id='7GzAD'></th></span></q></dt></tr></i><div id='7GzAD'><tfoot id='7GzAD'></tfoot><dl id='7GzAD'><fieldset id='7GzAD'></fieldset></dl></div>
                  <tfoot id='7GzAD'></tfoot>

                      <legend id='7GzAD'><style id='7GzAD'><dir id='7GzAD'><q id='7GzAD'></q></dir></style></legend>
                    1. <small id='7GzAD'></small><noframes id='7GzAD'>

                        <bdo id='7GzAD'></bdo><ul id='7GzAD'></ul>