jquery 透明度

    技术2022-07-11  166

    jquery 透明度

    A few days back I debuted a sweet article that made use of MooTools JavaScript and opacity to show focus on a specified element. Here's how to accomplish that feat using jQuery.

    几天前,我发表了一篇精彩的文章,该文章利用MooTools JavaScript和不透明度来显示对指定元素的关注。 这是使用jQuery完成这项壮举的方法。

    View Demo 观看演示

    jQuery JavaScript (The jQuery JavaScript)

    $(document).ready(function() { //area 1 $('.fade-area-1').children().hover(function() { $(this).siblings().stop().fadeTo(500,0.5); }, function() { $(this).siblings().stop().fadeTo(500,1); }); //area 2 $('.fade-area-2').children().hover(function() { $(this).siblings().stop().fadeTo(500,0.5); }, function() { $(this).siblings().stop().fadeTo(500,1); }); }); View Demo 观看演示

    There you have it. Opacity is a very simple but effective tool for building an attractive interface.

    你有它。 不透明度是一种非常简单但有效的工具,可用于构建吸引人的界面。

    翻译自: https://davidwalsh.name/opacity-focus-jquery

    jquery 透明度

    相关资源:原生js和jquery中有关透明度设置的相关问题
    Processed: 0.011, SQL: 9