jquery accordion focus animation
jquery The accordion focus animation plug-in can be used directly. Students who are interested in jquery can also use it to study and sublimate our jquery Knowledge.
Code:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>PHP中文网--手风琴焦点图</title> <style> *{margin:0; padding:0;} body,html{width:100%; height:100%;} .bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .bg-box-1{ background: url('http://www.php.cn/tpl/Index/Static/img/zhibo4.jpg') no-repeat center/cover; } .bg-box-2{ background: url('http://www.php.cn/tpl/Index/Static/img/banner1.jpg') no-repeat center/cover; } .bg-box-3{ background: url('http://www.php.cn/tpl/Index/Static/img/banner3.jpg') no-repeat center/cover; } .bg-box-4{ background: url('http://www.php.cn/tpl/Index/Static/img/banner4.jpg') no-repeat center/cover; } #wrap{ position: absolute; overflow: hidden; top:0; left:0; right:0; bottom:0; margin:auto; width: 1000px; height: 400px; } #wrap > ul{ width: 120%; list-style: none; } #wrap > ul > li{ float: left; width: 100px; height: 400px; cursor: pointer; } #wrap > ul > li:nth-child(1){ background: url('http://www.php.cn/tpl/Index/Static/img/zhibo4.jpg') no-repeat center/cover; } #wrap > ul > li:nth-child(2){ background: url('http://www.php.cn/tpl/Index/Static/img/banner1.jpg') no-repeat center/cover; } #wrap > ul > li:nth-child(3){ background: url('http://www.php.cn/tpl/Index/Static/img/banner3.jpg') no-repeat center/cover; } #wrap > ul > li:nth-child(4){ background: url('http://www.php.cn/tpl/Index/Static/img/banner4.jpg') no-repeat center/cover; width: 700px; } #wrap > ul > li > .text{ width: 100px; height: 100%; background: #000; opacity: .5; } #wrap > ul > li > .text p{ padding: 20px 40px; font-family: 'Microsoft yahei'; color: #fff; } </style> </head> <body> <div class="bg bg-box-1"></div> <div class="bg bg-box-2"></div> <div class="bg bg-box-3"></div> <div class="bg bg-box-4"></div> <div id="wrap"> <ul> <li> <div> <p>PHP中文网线上培训班</p> </div> </li> <li> <div> <p>创建一个属于自己的框架</p> </div> </li> <li> <div> <p>企业站点开发</p> </div> </li> <li> <div> <p>PHP中文网--这个专注编程教育的网站</p> </div> </li> </ul> </div> <script src="http://www.lanrenzhijia.com/ajaxjs/jquery.min.js"></script> <script type="text/javascript"> (function(){ $('#wrap li').mouseover(function(){ if(!$(this).hasClass('curr')){ $('#wrap li').removeClass('curr'); $(this).addClass('curr'); // 切换背景 $('#wrap li').each(function(index){ if($(this).hasClass('curr')){ $('.bg').fadeOut(300); $('.bg:eq(' + index + ')').fadeIn(500); } }); $('.curr').stop().animate({ width: 700 }, 500, 'linear'); $('#wrap li').not('.curr').stop().animate({ width: 100 }, 500, 'linear'); } }); })() </script> </body> </html>
The above is the source code of jquery accordion focus animation. Students who are interested or need it can use it directly. ,Research! For more articles and source codes, please search on PHP中文网~~
Related recommendations:
jquery title selection animation
jQuery code example to implement div following mouse movement
jquery to implement gesture unlocking source code
The above is the detailed content of jquery accordion focus animation. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Detailed explanation of jQuery reference method: Quick start guide jQuery is a popular JavaScript library that is widely used in website development. It simplifies JavaScript programming and provides developers with rich functions and features. This article will introduce jQuery's reference method in detail and provide specific code examples to help readers get started quickly. Introducing jQuery First, we need to introduce the jQuery library into the HTML file. It can be introduced through a CDN link or downloaded

We often use ppt in our daily work, so are you familiar with every operating function in ppt? For example: How to set animation effects in ppt, how to set switching effects, and what is the effect duration of each animation? Can each slide play automatically, enter and then exit the ppt animation, etc. In this issue, I will first share with you the specific steps of entering and then exiting the ppt animation. It is below. Friends, come and take a look. Look! 1. First, we open ppt on the computer, click outside the text box to select the text box (as shown in the red circle in the figure below). 2. Then, click [Animation] in the menu bar and select the [Erase] effect (as shown in the red circle in the figure). 3. Next, click [

How to use PUT request method in jQuery? In jQuery, the method of sending a PUT request is similar to sending other types of requests, but you need to pay attention to some details and parameter settings. PUT requests are typically used to update resources, such as updating data in a database or updating files on the server. The following is a specific code example using the PUT request method in jQuery. First, make sure you include the jQuery library file, then you can send a PUT request via: $.ajax({u

How to remove the height attribute of an element with jQuery? In front-end development, we often encounter the need to manipulate the height attributes of elements. Sometimes, we may need to dynamically change the height of an element, and sometimes we need to remove the height attribute of an element. This article will introduce how to use jQuery to remove the height attribute of an element and provide specific code examples. Before using jQuery to operate the height attribute, we first need to understand the height attribute in CSS. The height attribute is used to set the height of an element

Title: jQuery Tips: Quickly modify the text of all a tags on the page In web development, we often need to modify and operate elements on the page. When using jQuery, sometimes you need to modify the text content of all a tags in the page at once, which can save time and energy. The following will introduce how to use jQuery to quickly modify the text of all a tags on the page, and give specific code examples. First, we need to introduce the jQuery library file and ensure that the following code is introduced into the page: <

Title: Use jQuery to modify the text content of all a tags. jQuery is a popular JavaScript library that is widely used to handle DOM operations. In web development, we often encounter the need to modify the text content of the link tag (a tag) on the page. This article will explain how to use jQuery to achieve this goal, and provide specific code examples. First, we need to introduce the jQuery library into the page. Add the following code in the HTML file:

Sometimes we encounter the need to add animation to a ppt. For example, if we want to make a thunderstorm ppt and add some animated thunderstorm effects to it, what should we do? Today, the editor will introduce to you how to make an animated thunderstorm in thunderstorm ppt. It is actually very simple, come and learn it! 1. First we open a PPT page, "Insert" - "Shape" - "Basic Shape" - "Lightning Shape", as shown in the picture. 2. In the "Fill and Line" tab on the right, select "Fill": white; "Select" "Line": black, as shown in the figure. 3. Click "Animation" - "Custom Animation" - "Add Effects" - "Emphasis" - "Subtle" - "Flickering",

jQuery is a popular JavaScript library that is widely used to handle DOM manipulation and event handling in web pages. In jQuery, the eq() method is used to select elements at a specified index position. The specific usage and application scenarios are as follows. In jQuery, the eq() method selects the element at a specified index position. Index positions start counting from 0, i.e. the index of the first element is 0, the index of the second element is 1, and so on. The syntax of the eq() method is as follows: $("s
