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

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

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

        仅适用于悬停时的边框,但不适用于背景

        Transition only for the border on hover, but not for background(仅适用于悬停时的边框,但不适用于背景)

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

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

              <tbody id='Fcz4U'></tbody>
              <bdo id='Fcz4U'></bdo><ul id='Fcz4U'></ul>
                <tfoot id='Fcz4U'></tfoot>
                  本文介绍了仅适用于悬停时的边框,但不适用于背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这里有一些 CSS:

                      #image-edges-beneath:hover{
                      background-color: blue;
                      }
                  
                      #image-edges:hover{
                        background-color: blue;
                      }
                  
                      #image-edges-beneat:hover:after{
                      -webkit-transition: all 1s ease;
                           -moz-transition: all 1s ease;
                             -o-transition: all 1s ease;
                            -ms-transition: all 1s ease;
                                transition: all 1s ease;
                        border: 2px solid #F1FD6D;
                      }
                  
                      #image-edges:hover:after{
                      -webkit-transition: all 1s ease;
                           -moz-transition: all 1s ease;
                             -o-transition: all 1s ease;
                            -ms-transition: all 1s ease;
                                transition: all 1s ease;
                        border: 2px solid #F1FD6D;
                      }
                  

                  但是这不起作用.唯一发生的是背景颜色有一个过渡,而我希望它只在悬停时改变,而边框我想有一个过渡,所以基本上边框淡入颜色,而背景颜色在悬停时立即改变颜色.这就是我想要完成的,但这不起作用.:(用户有什么想法吗?

                  However this does not work. The only thing which happens is that the background color has a transition while I want it to only change on hover, while the border I want to have a transition, so basically the border fades into the color while the background color changes color immediately upon hover. That's what I want to accomplish, but this doesn't work. :( Any ideas users?

                  推荐答案

                  你需要做的是设置你想要正确转换的属性.目前您将其设置为全部",但它需要是背景颜色"或边框颜色",基于您想要进行转换.

                  What you need to do is set which property you want to transistion properly. Currently you have it as "all" but it needs to be either "background-color" or "border-color" based on which you want to be transitioned.

                   transition: border-color 1s ease;  
                  

                  http://jsfiddle.net/u3Ahk/

                  这篇关于仅适用于悬停时的边框,但不适用于背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Move link image 5px up on hover(悬停时将链接图像向上移动 5px)
                  How do I inspect CSS pseudo classes with firebug?(如何使用 firebug 检查 CSS 伪类?)
                  Why doesn#39;t CSS hover work on table rows when the cells inside the rows have class names?(当行内的单元格具有类名时,为什么 CSS 悬停在表格行上不起作用?)
                  Hover image - display div over it(悬停图像 - 在其上显示 div)
                  How to apply a CSS class on hover to dynamically generated submit buttons?(如何在悬停时将 CSS 类应用于动态生成的提交按钮?)
                  Differences between CSS3 :hover and :focus?(CSS3 :hover 和 :focus 的区别?)
                      <tbody id='5tkqj'></tbody>
                    • <bdo id='5tkqj'></bdo><ul id='5tkqj'></ul>
                      <tfoot id='5tkqj'></tfoot>

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