今天为大家带来一款鼠标经过当前高亮其它变暗jQuery插件jFade,此款插件能实现的功能简单而且很实用,当鼠标经过图片列表或是文字列表时悬停当前高亮显示,其它图片列表变暗突出显示鼠标当前悬停。

复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta name="Author" content="pakaerf"> 
    <script type='text/javascript' src='jquery.min.js'></script>
    <script type='text/javascript' src='jfade.js'></script>
    <link rel="stylesheet" href="main.css"  type="text/css"/>
    <script type="text/javascript"> 
    $().ready(function() {
        $('.jfade_image').jfade();
        $('.portfolio').jfade({
            start_opacity: ".4",
            high_opacity: "1",
            low_opacity: ".2",
            timing: "500"
        });
        $('.button').jfade({
            start_opacity: "1",
            high_opacity: "1",
            low_opacity: ".4",
            timing: "500"
        });
        $('.text').jfade({
            start_opacity: "1",
            high_opacity: "1",
            low_opacity: ".7",
            timing: "500"
        });
        $('.links').jfade({
            start_opacity: ".9",
            high_opacity: "1",
            low_opacity: ".2",
            timing: "500"
        });
    }); 
    </script> 
</head>
<body>
    <div id="wrapper">
        <h1>jFade</h1>
        <p>jFade is a simple jquery plug-in that lets you highlight items on your website. Not only are customizable fades possible, but easy control of surrounding elements makes your most important content stand out.</p><br />
        <h2>Portfolio Gallery</h2><br />
        <p>(Fade adjoining objects out)</p>
        <div id="images">
            <img src="/UploadFiles/2021-04-02/card02.jpg">             <img src="images/card04.jpg">             <img src="/UploadFiles/2021-04-02/card09.jpg">             <img src="images/card13.jpg">             <img src="/UploadFiles/2021-04-02/card14.jpg">             <img src="images/card15.jpg">             <img src="/UploadFiles/2021-04-02/card16.jpg">             <img src="images/card17.jpg">         </div><br /><br />
        <p>To use default settings just add the function </p>
        <code>&lt;script type=&quot;text/javascript&quot;&gt;  <br />
    $().ready(function() {<br />
        $('.jfade_image').jfade();<br />
    });  <br />
&lt;/script&gt;</code><br /><br />
        <p>and add the class tag to each element:</p>
        <code>&lt;img src=&quot;images/card02.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card04.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card09.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card13.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card14.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card15.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card16.jpg&quot; class=&quot;jfade_image&quot;/&gt;<br />
            &lt;img src=&quot;images/card17.jpg&quot; class=&quot;jfade_image&quot;/&gt;</code><br /><br />
        <p>Custom settings are easily set and explained in the help doc</p><br /><br />
        <h2>Portfolio Gallery 2</h2><br />
        <p>(Fade objects in)</p>
        <div id="images">
            <img src="/UploadFiles/2021-04-02/card02.jpg">             <img src="images/card04.jpg">             <img src="/UploadFiles/2021-04-02/card09.jpg">             <img src="images/card13.jpg">             <img src="/UploadFiles/2021-04-02/card14.jpg">             <img src="images/card15.jpg">             <img src="/UploadFiles/2021-04-02/card16.jpg">             <img src="images/card17.jpg">         </div><br /><br />
        <h2>Call to Action Button</h2><br />
        <p>(give buttons some flair)</p>
        <div id="buttons">
            <ul>
                <li>
                <a class="small button green" href="https://www.jb51.net/" target="_blank" >Green </a>
                <a class="small button blue" href="https://www.jb51.net/" target="_blank" >Blue </a>
                <a class="large button pink" href="https://www.jb51.net/" target="_blank" >Pink </a>
                <a class="small button orange" href="https://www.jb51.net/" target="_blank" >Orange </a>
                <a class="small button yellow" href="https://www.jb51.net/" target="_blank" >Yellow </a></li>
            </ul>
        </div><br /><br />
        <h2>Text</h2><br />
        <p>(have subtle effects)
        <div id="paragraphs">
            <div id="column" class="text">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus in eleifend justo. Aenean a porttitor enim. Sed aliquet ullamcorper euismod. Morbi dapibus pretium mauris. Pellentesque consequat ante et magna gravida eleifend. Donec et lorem nulla. Integer dignissim nisi et lectus bibendum ornare venenatis odio venenatis. Aliquam dignissim iaculis neque, sed accumsan erat aliquam porttitor.</div>
            <div id="column" class="text">Quisque lobortis, turpis id ornare mollis, diam magna semper libero, lacinia pharetra lectus nibh eget purus. Aenean dignissim sollicitudin gravida. Suspendisse non leo at nunc tempus elementum. Curabitur vitae commodo libero. Sed erat tortor, ornare id luctus vel, ullamcorper eget lacus. Maecenas ac placerat lectus. Sed quis nunc vitae lacus dignissim interdum. </div>
            <div id="column" class="text">Nulla facilisi. In et ante tellus, quis feugiat ante. Sed et lectus id ante viverra fringilla in eget nisi. Duis sit amet augue lorem, quis luctus erat. Morbi sed diam id orci lacinia tincidunt vel auctor velit. Etiam pulvinar nibh eget ante tincidunt rhoncus. Morbi commodo eros lobortis dolor suscipit eleifend. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. </div>
        </div><br /><br /><br /><br />
        <div id="footer">
            <h2>Links</h2><br />
            <p>You can fade anything you like, by just adding a class - even links: <a href="https://www.jb51.net/" title="Facebook" target="_blank" class="links">facebook</a>, <a href="https://www.jb51.net/" target="_blank" title="Linkedin" class="links">linkedin</a>, <a href="https://www.jb51.net/" title="Flavors.me Personal Page" target="_blank" class="links">flavors.me</a></p> <br /><br />
        </div>
    </div>
</body>
</html>

以上就是本文的全部内容了,希望对大家熟练掌握jQuery特效能有所帮助。

华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。