search
HomeWeb Front-endJS Tutorialjquery diluted version of banner asynchronous picture text effect switching picture special effects_jquery

Copy code The code is as follows:

 <br> <br> <br><meta charset="utf-8"> <br><title>全屏淡入淡出简洁banner,异步图片文字效果切换图片特效</title> <br><meta name="keywords" content="淡化版banner,淡化版banner"> <br><meta name="description" content="淡入淡出简洁banner"> <br><style type="text/css"> <BR>body,ul,li,ol{list-style:none;padding:0px;margin:0px;font-size:12px;} <BR>img{border:0px;} <br><br>.bzBanner{width:100%; min-width:980px; height:auto; overflow:hidden; position: relative; } <BR>.bzBanner .content,.bzBanner .col,.bzBanner .col a{width:100%; height:100%; position: absolute; top:0px; left:0px; } <BR>.bzBanner .btn{position: absolute; bottom:25px; right:50px; z-index:5; } <BR>.bzBanner .btn i{display:block; float: left; width:15px; height:15px; padding:0 5px; border-radius:15px; margin-left:15px; background:white; overflow:hidden; opacity:0.4; filter:alpha(opacity=40); cursor:pointer; } <BR>.bzBanner .btn i:hover{background:#9C0; } <BR>.bzBanner .btn i.act{opacity:0.8; filter:alpha(opacity=80); background:#9C0; } <BR>.bzBanner .pre,.bzBanner .next{display:inline-block; width:72px; height:72px; background:url(./bzbanner/btn.png) no-repeat; position:absolute; top:50%; margin-top:-50px; z-index:3; } <BR>.bzBanner .pre{left:30px; } <BR>.bzBanner .next{right:30px; background-position:0 -72px; } <BR>.bzBanner .pre:hover{background-position:0 -144px; } <BR>.bzBanner .next:hover{background-position:0 -216px; } <BR>.bzBanner .col a{color:white; } <BR>.bzBanner .col span{display:inline-block; width:550px; height:200px; background:rgba(0,0,0,.1); position:absolute; z-index:3; bottom:70px; left:130px; } <BR>.bzBanner .col span h3{font-weight:normal; font-size:28px; font-weight:normal; font-family:微软雅黑; padding:0px; margin:0px; padding-left:20px; line-height:70px; text-shadow:1px 1px rgba(0,0,0,.3); } <BR>.bzBanner .col span p{display:inline-block; width:90%; line-height:25px; font-size: 14px; font-family:微软雅黑; margin:0px; padding:0px; padding-left:20px; text-shadow:1px 1px rgba(0,0,0,.3); } <br><br></style> <br> <br> <br><br><div class="bzBanner"> <br><div class="content"> <br><div class="col"> <br><a href="javascript:;"> <br><img  src="/static/imghwm/default1.png" data-src="./jquery-1.10.2.min.js" class="lazy"    style="max-width:90%" alt="jquery diluted version of banner asynchronous picture text effect switching picture special effects_jquery" > <br><span> <br><h3 id="独家首播-范玮琪-amp-曾静玟-千年">独家首播:范玮琪&曾静玟《千年》</h3> <br><p>范玮琪&曾静玟《千年》MV首播!歌词特别力邀名词人葛大為操刀,延续“一日如千年”的概念,转换在爱情里就是可以把对方的思念拉得很长,每一秒的想念都可以像是一千年的蔓延。而一千年的等待,也因为一秒钟的珍爱相遇而有了意义爱情。</p> <br></span> <br></a> <br>
</div> <br><div class="col"> <br><a href="javascript:;"> <br><img  src="/static/imghwm/default1.png" data-src="./jquery-1.10.2.min.js" class="lazy"    style="max-width:90%" alt="jquery diluted version of banner asynchronous picture text effect switching picture special effects_jquery" > <br><span> <br><h3 id="独家首播-It-Began-With-A-Fallen-Leaf">独家首播:It Began With A Fallen Leaf</h3> <br><p>普莉西雅(Priscilla Ahn)和苏打绿全新单曲《It Began With A Fallen Leaf》MV首播!一袭白色雪纺洋装的普莉西雅置身于森林中,红发青峰似偶然闯入森林中活泼调皮的精灵,邂逅了森林中的仙女。歌曲由吴青峰作曲,普莉西雅和吴青峰共同作词,描述了对一位再也无法相见的好友的思念之情。</p> <br></span> <br></a> <br>
</div> <br><div class="col"> <br><a href="javascript:;"> <br><img  src="/static/imghwm/default1.png" data-src="./jquery-1.10.2.min.js" class="lazy"    style="max-width:90%" alt="jquery diluted version of banner asynchronous picture text effect switching picture special effects_jquery" > <br><span> <br><h3 id="首播-真的假的">首播:真的假的</h3> <br><p>暌违乐坛八年陶晶莹新专辑同名主打《真的假的》MV官方版首播!歌曲由周杰伦+林夕两位乐坛大才子携手合作,唱出男女情爱中许多真真假假的现象和矛盾,MV由廖人帥执导,时而如梦幻童话时而如辉煌宫殿的场景布置亦真亦假似幻似真,逼真特技效果十足!</p> <br></span> <br></a> <br>
</div> <br><div class="col"> <br><a href="javascript:;"> <br><img  src="/static/imghwm/default1.png" data-src="./jquery-1.10.2.min.js" class="lazy"    style="max-width:90%" alt="jquery diluted version of banner asynchronous picture text effect switching picture special effects_jquery" > <br><span> <br><h3 id="口袋-FAN-把你的偶像装进口袋里">口袋·FAN 把你的偶像装进口袋里</h3> <br><p>睡不着过后,梦游到这里。在亚纶生日的这一天迎来闪闪发亮的【口袋·炎亚纶】!这里有新鲜资讯影像 ,是勾搭交流平台。是炎亚纶专属,为每一个可爱的布丁纪念永恒,关于阿布有爱的一切都在这里,在这 里全世界只看见你,快把阿布装进口袋,祝炎亚纶1120生日快乐!Android版和IOS越狱版抢先上线…</p> <br></span> <br></a> <br>
</div> <br>
</div> <br><div class="btn">
<i></i><i></i><i></i><i></i>
</div> <br><a class="pre" href="javascript:;" title="上一张"></a> <br><a class="next" href="javascript:;" title="下一张"></a> <br>
</div> <br><br><script type="text/javascript"></script> <br><script type="text/ javascript" src="./bzBanner.min.js"></script> <br><script type="text/javascript"> <BR>$(function(){ benzi.bzBanner(); }); <BR></script> <br> <br>

 
----------html----------------- -------------------------------------------------- --------------
<pre code_snippet_id=" 280064" snippet_file_name="blog_20140408_2_455436" name="code" class="javascript">/*================================ ===== <br>@Title: diluted version of banner with title description and small button <br>@Time: 2013.11.22 <br>@Source: BENZI.PW <br>@Description: <br><br> How to use the plug-in: <br>Please copy the CSS HTML completely before use.<br>benzi.bzBanner(); <br><br>Object calls are all changed in js<br>container: outermost frame<br>cols: all content<br>btns: all small buttons<br>act: Button activation style name <br>pre: Scroll forward button <br>next: Scroll backward button <br><br><br>====*/ <br>var benzi = { <br>bzBanner: function (){ <br><br>//All parameters are initialized (will be deleted after encapsulation) <br>var values ​​= { <br>container:$('.bzBanner'), <br>cols:$('.bzBanner .col'), <br>btns:$('.bzBanner .btn i'), <br>act:'act', <br>pre:$('.bzBanner .pre'), <br>next: $('.bzBanner .next'), <br>now:0 <br>} <br><br>//Fade effect, set zindex of all individual objects, and show and hide <br>// col: all Content object <br> // pre: previous object <br> // now: currently displayed object <br> // ----------------------- - <br>var weaken = function( pre,now ){ <br>var col = values.cols; <br>col.css({ zIndex:1 }).eq( pre ).css({ zIndex:2 } ); <br>col.eq( now ).css({ zIndex:3,opacity:0 }).stop(true).animate({ opacity:1 },700); <br>} <br><br>//Incremental calculation, return the previous displayed content and the current content to be displayed<br>// now: the currently selected index<br>//---------------- --- <br>var increase = function( now ){ <br>var pre = now ,now = pre 1; <br>if( now >= values.cols.length ) now = 0; <br>return { pre:pre ,now:now }; <br>} <br><br>//Decreasing calculation<br>//------------------ <br>var regression = function( now ){ <br>var pre = now ,now = pre - 1; <br>if( now return { pre: pre ,now:now }; <br>} <br><br>//Modify the small button style<br>//--------------------- <br>var btnStyle = function( now ){ <br>if( values.btns && values.act ) <br>values.btns.removeClass( values.act ).eq( now ).addClass( values.act ); <br>} <br><br>//Small button event hook, if there is a small button in the initialization, it will be executed, otherwise it will not be executed <br>//---------------- ------ <br>var button = function(){ <br>values.btns.click(function(){ <br>var now = $(this).index(); <br>if( values .now != now ){ <br>weaken( values.now ,now ); <br>btnStyle( now ); <br>text( now ); <br>values.now = now; <br>} <br>}); <br>} <br><br>//Content switching<br>// aspect: direction, 0 or no value means backward flipping, 1 means forward flipping<br>//------ ---------------- <br>var change = function( aspect ){ <br>var val = aspect ? regression( values.now ) : increase( values.now ); <br>weaken( val.pre ,val.now ); <br>btnStyle( val.now ); <br>text( val.now ); <br>values.now = val.now; <br>} <br><br>//Left and right button effects<br>//----------------------- <br>var shortcut = function(){ <br> values.pre.click(function(){ change(1); }); <br>values.next.click(function(){ change(); }); <br>} <br><br>// Text switching effect, this effect is very targeted and requires style support <br>//--------------------- <br>var text = function ( now ){ <br>values.cols.find('span').css({ opacity:0 }).eq( now ).stop(true).delay(500).animate({ opacity:1 }, 1000); <br>values.cols.find('h3').css({ opacity:0 }).eq( now ).stop(true).delay(500).animate({ opacity:1 },500 ); <br>values.cols.find('p').css({ opacity:0 }).eq( now ).stop(true).delay(1000).animate({ opacity:1 },500) ; <br>} <br><br>//Frame size<br>//-------------------------------- - <br>$(window).resize(function(){ <br>values.container.height( values.cols.find('img').height() ); <br>}).resize(); <br><br>//Auto play, the degrees method gets the corresponding parameters, and modifies the small button style (if there is a small button), and then refreshes the global variable values.now <br>// time: delay time<br> //--------------------- <br>var loop,play = function( time ){ <br>clearTimeout( loop ); <br>loop = setTimeout (function(){ <br>change(); <br>play( 3000 ); <br>}, time ); <br>} <br><br>//Pause and trigger automatic play<br>// --------------------- <br>var control = function(){ <br>values.container.hover(function(){ <br>clearTimeout( loop ); <br>},function(){ <br>play( 2000 ); <br>}); <br>} <br><br>//Initialize the effect and call each function <br>//-- ------------------ <br>var initialize = function(){ <br>var now = values.now; <br>weaken( values.cols.length-1 ,now ); <br>if(values.btns ) button(); <br>if( values.pre && values.next ) shortcut(); <br>btnStyle( now ); <br>text( now ); <br>play( 4000 ); <br>control(); <br>} <br><br>//Initialization call<br>//---------------- ----- <br>initialize(); <br><br>} <br><br>} <br>






 


 


Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Understanding the JavaScript Engine: Implementation DetailsUnderstanding the JavaScript Engine: Implementation DetailsApr 17, 2025 am 12:05 AM

Understanding how JavaScript engine works internally is important to developers because it helps write more efficient code and understand performance bottlenecks and optimization strategies. 1) The engine's workflow includes three stages: parsing, compiling and execution; 2) During the execution process, the engine will perform dynamic optimization, such as inline cache and hidden classes; 3) Best practices include avoiding global variables, optimizing loops, using const and lets, and avoiding excessive use of closures.

Python vs. JavaScript: The Learning Curve and Ease of UsePython vs. JavaScript: The Learning Curve and Ease of UseApr 16, 2025 am 12:12 AM

Python is more suitable for beginners, with a smooth learning curve and concise syntax; JavaScript is suitable for front-end development, with a steep learning curve and flexible syntax. 1. Python syntax is intuitive and suitable for data science and back-end development. 2. JavaScript is flexible and widely used in front-end and server-side programming.

Python vs. JavaScript: Community, Libraries, and ResourcesPython vs. JavaScript: Community, Libraries, and ResourcesApr 15, 2025 am 12:16 AM

Python and JavaScript have their own advantages and disadvantages in terms of community, libraries and resources. 1) The Python community is friendly and suitable for beginners, but the front-end development resources are not as rich as JavaScript. 2) Python is powerful in data science and machine learning libraries, while JavaScript is better in front-end development libraries and frameworks. 3) Both have rich learning resources, but Python is suitable for starting with official documents, while JavaScript is better with MDNWebDocs. The choice should be based on project needs and personal interests.

From C/C   to JavaScript: How It All WorksFrom C/C to JavaScript: How It All WorksApr 14, 2025 am 12:05 AM

The shift from C/C to JavaScript requires adapting to dynamic typing, garbage collection and asynchronous programming. 1) C/C is a statically typed language that requires manual memory management, while JavaScript is dynamically typed and garbage collection is automatically processed. 2) C/C needs to be compiled into machine code, while JavaScript is an interpreted language. 3) JavaScript introduces concepts such as closures, prototype chains and Promise, which enhances flexibility and asynchronous programming capabilities.

JavaScript Engines: Comparing ImplementationsJavaScript Engines: Comparing ImplementationsApr 13, 2025 am 12:05 AM

Different JavaScript engines have different effects when parsing and executing JavaScript code, because the implementation principles and optimization strategies of each engine differ. 1. Lexical analysis: convert source code into lexical unit. 2. Grammar analysis: Generate an abstract syntax tree. 3. Optimization and compilation: Generate machine code through the JIT compiler. 4. Execute: Run the machine code. V8 engine optimizes through instant compilation and hidden class, SpiderMonkey uses a type inference system, resulting in different performance performance on the same code.

Beyond the Browser: JavaScript in the Real WorldBeyond the Browser: JavaScript in the Real WorldApr 12, 2025 am 12:06 AM

JavaScript's applications in the real world include server-side programming, mobile application development and Internet of Things control: 1. Server-side programming is realized through Node.js, suitable for high concurrent request processing. 2. Mobile application development is carried out through ReactNative and supports cross-platform deployment. 3. Used for IoT device control through Johnny-Five library, suitable for hardware interaction.

Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)Building a Multi-Tenant SaaS Application with Next.js (Backend Integration)Apr 11, 2025 am 08:23 AM

I built a functional multi-tenant SaaS application (an EdTech app) with your everyday tech tool and you can do the same. First, what’s a multi-tenant SaaS application? Multi-tenant SaaS applications let you serve multiple customers from a sing

How to Build a Multi-Tenant SaaS Application with Next.js (Frontend Integration)How to Build a Multi-Tenant SaaS Application with Next.js (Frontend Integration)Apr 11, 2025 am 08:22 AM

This article demonstrates frontend integration with a backend secured by Permit, building a functional EdTech SaaS application using Next.js. The frontend fetches user permissions to control UI visibility and ensures API requests adhere to role-base

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function