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

    1. <small id='oYbTO'></small><noframes id='oYbTO'>

        <bdo id='oYbTO'></bdo><ul id='oYbTO'></ul>
      1. 使用 -webkit-backface-visibility 时,Windows Chrome 中的单选按钮背景变为白色

        Radio button background goes white in Windows Chrome when using -webkit-backface-visibility. Any workarounds?(使用 -webkit-backface-visibility 时,Windows Chrome 中的单选按钮背景变为白色.任何解决方法?)

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

              <small id='3bJGI'></small><noframes id='3bJGI'>

              <legend id='3bJGI'><style id='3bJGI'><dir id='3bJGI'><q id='3bJGI'></q></dir></style></legend>
              <tfoot id='3bJGI'></tfoot>
                <bdo id='3bJGI'></bdo><ul id='3bJGI'></ul>
                    <tbody id='3bJGI'></tbody>
                • 本文介绍了使用 -webkit-backface-visibility 时,Windows Chrome 中的单选按钮背景变为白色.任何解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  Windows Chrome 中存在一个错误,当单选按钮的父级不在文档流中并且应用了 -webkit-backface-visibility 时,它会使单选按钮的背景变为白色.

                  There's a bug in Windows Chrome that makes a radio button's background turn white when its parent is both out of the document flow and has -webkit-backface-visibility applied.

                  这是在行动:http://jsfiddle.net/misterkeg/uMajC/

                  我正在使用 -webkit-backface-visiblity: hidden 来解决 WebKit 过渡闪烁错误.

                  I'm using -webkit-backface-visiblity: hidden to get around the WebKit transition flicker bug.

                  如果我改用 -webkit-transform: translateZ(0) 修复程序也会出现此问题,因此它似乎在硬件加速处于活动状态时启动.

                  This problem also occurs if I use the -webkit-transform: translateZ(0) fix instead, so it seems to kick in whenever hardware acceleration is active.

                  将输入的 -webkit-backface-visibility 覆盖为 visible 也无济于事.

                  Overriding the input's -webkit-backface-visibility to visible doesn't help either.

                  是否有任何已知的解决方法?我已提交 Chromium 错误,但想知道是否有任何解决方法在此期间.

                  Are there any known workarounds to this? I've filed a Chromium bug but would like to know if there are any ways around it in the meantime.

                  推荐答案

                  我发现了相同的问题,但在不同的上下文中,所以可能不是 -webkit-backface-visiblity 的问题,而是多种事物的组合.在我的情况下,当带有单选按钮的页面包含像地图这样的谷歌地图(专有地图,我还没有找到地图中究竟是什么导致问题)并显示在 iframe 内时,就会出现问题.如果我用检查器隐藏地图,单选按钮看起来没问题,或者如果我直接查看页面,而不是在 iframe 内.

                  I have found the same problem but in different context, so might be it's not a problem with -webkit-backface-visiblity but with several combinations of things. In my case the problem arises when the page with the radio buttons contains a google maps like map (a propietary one, I haven't found what exactly in the map causes the problem) and is displayed inside an iframe. If I hide the map with the inspector the radio buttons look ok, or if I view the page directly, not inside the iframe.

                  我发现的唯一解决方法是在 CSS ninja 的此页面中:http://www.thecssninja.com/css/custom-inputs-using-css.

                  The only workaround I've found is in this page from CSS ninja: http://www.thecssninja.com/css/custom-inputs-using-css.

                  总而言之,这就是解决方案(我提到的页面有一个现场演示链接,http://www.thecssninja.com/demo/css_custom-forms/):

                  In summary, this is the solution (there is a live demo linked from the page I've mentioned, http://www.thecssninja.com/demo/css_custom-forms/):

                  HTML

                  <label for="input1" class="radio_image">
                   <input type="radio" name="input" id="input1" />
                   <span>Option 1</span>
                  </label>
                  

                  CSS

                  /*we hide the real radio button*/
                  .radio_image input[type=radio] {
                    position:absolute;opacity:0;
                  }
                  /*we assign the span a background image
                    which is a capture of the actual radio button*/
                  .radio_image input[type=radio] + span {
                    background-image: url("radio-button.gif");
                    background-position: left top;
                    background-repeat: no-repeat;
                    padding-left: 1.6em;
                  }
                  /*if radio is checked we change the background
                    image to one with a checked radio button (it can be
                    done with a sprite type background too): */
                  .radio_image input[type=radio]:checked + span {
                    background-image: url("radio-button-checked.gif");
                  }
                  

                  由于跨度在标签内,点击它与点击单选按钮本身的效果相同,所以单选按钮仍然可以正常工作.

                  As the span is inside the label, clicking on it will have the same effect as clicking on the radio button itself, so the radio button still works ok.

                  我在开发环境中工作,所以我无法向您发布网址,但通过上面的代码和链接,我认为很容易看到.

                  I am working in a developement enviroment so I cant post you the url, but with the code and the links above I think it's easy to see.

                  如果您只想针对 Chrome,可以尝试这篇文章中提供的解决方案:你能定位谷歌浏览器吗?

                  If you want to target just Chrome, you can try the solution provided in this post: Can you target Google Chrome?

                  我希望它有所帮助,我不喜欢这样复杂的方式来呈现一个简单的单选按钮,在我的情况下,我已经在我的网站中唯一存在该问题的页面中使用它并且它运行良好.

                  I hope it helps, I don't like such a complicated way to render just a simple radio button, in my case I've used it in the only page having that problem in my site and it has worked fine.

                  这篇关于使用 -webkit-backface-visibility 时,Windows Chrome 中的单选按钮背景变为白色.任何解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Styling radio button - not work in IE and Firefox(样式单选按钮 - 在 IE 和 Firefox 中不起作用)
                  How to customize radio button in html(如何在html中自定义单选按钮)
                  Show div when radio button selected(选择单选按钮时显示 div)
                  Radio/checkbox alignment in HTML/CSS(HTML/CSS 中的单选/复选框对齐)
                  How to make a radio button look like a toggle button(如何使单选按钮看起来像切换按钮)
                  How to change the size of the radio button using CSS?(如何使用 CSS 更改单选按钮的大小?)
                • <legend id='DHI5t'><style id='DHI5t'><dir id='DHI5t'><q id='DHI5t'></q></dir></style></legend>

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

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

                            <tfoot id='DHI5t'></tfoot>