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

    <tfoot id='kaJNe'></tfoot>

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

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

        链接悬停的淡入淡出效果?

        时间:2023-11-01

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

          <small id='5lyhN'></small><noframes id='5lyhN'>

        1. <tfoot id='5lyhN'></tfoot>

                <tbody id='5lyhN'></tbody>

                • <bdo id='5lyhN'></bdo><ul id='5lyhN'></ul>

                  <legend id='5lyhN'><style id='5lyhN'><dir id='5lyhN'><q id='5lyhN'></q></dir></style></legend>
                  本文介绍了链接悬停的淡入淡出效果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在许多网站上,例如 http://www.clearleft.com,您会注意到当链接悬停在上方时,它们会淡出不同的颜色,而不是立即切换,这是默认操作.

                  on many sites, such as http://www.clearleft.com, you'll notice that when the links are hovered over, they will fade into a different color as opposed to immediately switching, the default action.

                  我假设使用 JavaScript 来创建这种效果,有人知道怎么做吗?

                  I assume JavaScript is used to create this effect, does anyone know how?

                  推荐答案

                  现在人们只是在使用 CSS3 过渡 因为它比 搞乱 JS 容易得多a>,浏览器支持相当不错,而且只是装饰性的,所以如果它不起作用也没关系.

                  Nowadays people are just using CSS3 transitions because it's a lot easier than messing with JS, browser support is reasonably good and it's merely cosmetic so it doesn't matter if it doesn't work.

                  这样的事情可以完成:

                  a {
                    color:blue;
                    /* First we need to help some browsers along for this to work.
                       Just because a vendor prefix is there, doesn't mean it will
                       work in a browser made by that vendor either, it's just for
                       future-proofing purposes I guess. */
                    -o-transition:.5s;
                    -ms-transition:.5s;
                    -moz-transition:.5s;
                    -webkit-transition:.5s;
                    /* ...and now for the proper property */
                    transition:.5s;
                  }
                  a:hover { color:red; }
                  

                  您还可以通过用逗号分隔每个声明来转换具有不同时间和缓动功能的特定 CSS 属性,如下所示:

                  You can also transition specific CSS properties with different timings and easing functions by separating each declaration with a comma, like so:

                  a {
                    color:blue; background:white;
                    -o-transition:color .2s ease-out, background 1s ease-in;
                    -ms-transition:color .2s ease-out, background 1s ease-in;
                    -moz-transition:color .2s ease-out, background 1s ease-in;
                    -webkit-transition:color .2s ease-out, background 1s ease-in;
                    /* ...and now override with proper CSS property */
                    transition:color .2s ease-out, background 1s ease-in;
                  }
                  a:hover { color:red; background:yellow; }
                  

                  此处演示

                  这篇关于链接悬停的淡入淡出效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 CSS 显示和隐藏 div? 下一篇:如何应用 child:hover 但不是 parent:hover

                  相关文章

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

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

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

                    • <bdo id='vvE86'></bdo><ul id='vvE86'></ul>

                    <tfoot id='vvE86'></tfoot>