search
HomeWeb Front-endJS TutorialDetailed explanation of the scrolling switching effect of image and text highlighting with jQuery

This time I will bring you a detailed explanation of jQuery's scrolling switching effect of graphic and text highlighting. What are the precautions for jQuery to create scrolling switching effect of graphic and text highlighting. The following is a practical case. Let's take a look. take a look.

Here we introduce the jQuery graphic and text highlight scrolling switching effect. jQuery mouse slides over the graphic and text switch light switching special effect. The background darkens and the sub-content slides up to display. The mouse operation feels very strong. I hope you like it. This effect.

The screenshot of the running effect is as follows:

The specific code is as follows:

nbsp;html>


<title>jQuery图文高亮滚动切换</title>
<style>
*{ margin:0; padding:0;}
body{ font-family:"宋体"; font-size:12px;text-decoration:none; color:#292929; }
h1,h2,h3,h4,h5,h6,p,input,select,td{margin:0;padding:0;}
li{list-style:none;}
.fl{float:left;}
a{text-decoration:none;color:#353535;}
img{border:0; vertical-align:top;}
.clear{clear:both;}
.grid1k {
 width: 990px;
 margin: 0 auto;
}
.grid_full {
 width: 100%;
}
.grid1024 {
 width: 1024px;
 margin: 0 auto;
}
.fr {
 float: right;
}
.fl {
 float: left;
}
.color_blue {
 color: #29388c;
}
.color_fff {
 color: #fff;
}
.color_333 {
 color: #333;
}
.color_666 {
 color: #666;
}
.color_999 {
 color: #999;
}
.color_orange {
 color: #e88d27;
}
.one_fourth_box {
 display: block;
 position: relative;
 width: 326px;
 height: 135px;
 margin: 0 2px 2px 0;
 background: #f6f6f6;
 overflow: hidden;
}
.ofb-r {
 margin-right: 0!important;
}
.ofb-bg {
 display: none;
 width: 100%;
 height: 100%;
 position: absolute;
 z-index: 2;
 background: #333;
}
.ofb-img {
 position: absolute;
 top: 32px;
 left: 13px;
 z-index: 10;
}
.ofb-img-bottom {
 position: absolute;
 top: 160px;
 left: 13px;
 z-index: 10;
}
.ofb-text {
 position: absolute;
 top: 25px;
 left: 144px;
 width:178px;
 z-index: 10;
}
.ofb-text-top {
 position: absolute;
 top: -110px;
 left: 144px;
 width: 178px;
 z-index: 10;
}
.ofb-text h5,.ofb-text-top h5 {
 font-size: 14px; line-height:16px;
}
.ofb-text p,.ofb-text-top p {
 margin-top: 3px; font-size:12px; font-family:"宋体"; line-height:15px;
}
.ofb-r .ofb-img,.ofb-r .ofb-img-bottom {
 left: 65px;
}
.ofb-r .ofb-text,.ofb-r .ofb-text-top {
 left: 235px;
 width: 265px;
}
.color_111{ font-size:14px; color: #999;}
.color_222{ font-size:14px; color: #000;}
</style>
<script></script>
<script>
  $(function(){
   //服务
   $(&#39;.one_fourth_box&#39;).each(function(){
    $(this).hover(function(){
     $(this).children(&#39;.ofb-img&#39;).stop(true).animate({top:&#39;-135px&#39;})
     $(this).children(&#39;.ofb-img-bottom&#39;).stop(true).animate({top:&#39;25px&#39;})
     $(this).children(&#39;.ofb-text&#39;).stop(true).animate({top:&#39;160px&#39;})
     $(this).children(&#39;.ofb-text-top&#39;).stop(true).animate({top:&#39;25px&#39;})
     $(this).children(&#39;.ofb-bg&#39;).stop(true,true).fadeIn();
    },function(){
     $(this).children(&#39;.ofb-img&#39;).stop(true).animate({top:&#39;25px&#39;})
     $(this).children(&#39;.ofb-img-bottom&#39;).stop(true).animate({top:&#39;160px&#39;})
     $(this).children(&#39;.ofb-text&#39;).stop(true).animate({top:&#39;25px&#39;})
     $(this).children(&#39;.ofb-text-top&#39;).stop(true).animate({top:&#39;-110px&#39;})
     $(this).children(&#39;.ofb-bg&#39;).stop(true,true).fadeOut();
    })
   })
  })
 </script>
<meta>

<p> <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 </a></p>
 <p>
 </p><h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 
  <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 
 <p>
 </p>
<h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 
 </a> <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113025969.jpg" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 
 <p>
 </p>
<h5 id="节-能-Saving">节 能/Saving</h5>
 <p>玻璃窗是建筑物中隔热和保温最弱的环节。Sunscape太阳隔热膜能使窗户增加隔热和保
 温性能,有助于增加舒适性</p>
 
 </a> <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113741210.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113518952.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="移动互联网">移动互联网</h5>
 <p>移动互联网:APP客户端开发,Android、IOS、Winphone 多平台支持</p>
 
 <p>
 </p>
<h5 id="移动互联网">移动互联网</h5>
 <p>移动互联网:手机网站建设、APP客户端开发,Android、IOS、Winphone 多平台支持</p>
 
 </a> <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113138004.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810113033195.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="网站运维">网站运维</h5>
 <p>您多长时间更新一次网站?每天、每周还是半年...<br>
 网站运行的怎么样?给您带来收益了吗?<br>
 网站的运营与维护将决定网站的生命质量。</p>
 
 <p>
 </p>
<h5 id="网站运维">网站运维</h5>
 <p>您多长时间更新一次网站?每天、每周还是半年...网站运行的怎么样?给您带来收益了吗?网站的运营与维护将决定网站的生命质量。</p>
 
 </a> <a>
 <p></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810114041131.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p><img  src="/static/imghwm/default1.png" data-src="http://files.jb51.net/file_images/article/201508/2015810114120324.png" class="lazy" alt="Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery" ></p>
 <p>
 </p>
<h5 id="产品开发">产品开发</h5>
 <p>互联网功能性平台建设,定制化功能性网站产品销售。</p>
 
 <p>
 </p>
<h5 id="产品开发">产品开发</h5>
 <p>互联网功能性平台建设,定制化网站产品开发服务。</p>
 
 </a> 
<p><br>
</p>

I believe you have mastered the method after reading the case in this article, more Please pay attention to other related articles on the php Chinese website!

Recommended reading:

jquery mouse drags Table to sort (with code)

jQuery realizes sliding switching of provinces and cities (With code)

The above is the detailed content of Detailed explanation of the scrolling switching effect of image and text highlighting with jQuery. For more information, please follow other related articles on the PHP Chinese website!

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
Javascript Data Types : Is there any difference between Browser and NodeJs?Javascript Data Types : Is there any difference between Browser and NodeJs?May 14, 2025 am 12:15 AM

JavaScript core data types are consistent in browsers and Node.js, but are handled differently from the extra types. 1) The global object is window in the browser and global in Node.js. 2) Node.js' unique Buffer object, used to process binary data. 3) There are also differences in performance and time processing, and the code needs to be adjusted according to the environment.

JavaScript Comments: A Guide to Using // and /* */JavaScript Comments: A Guide to Using // and /* */May 13, 2025 pm 03:49 PM

JavaScriptusestwotypesofcomments:single-line(//)andmulti-line(//).1)Use//forquicknotesorsingle-lineexplanations.2)Use//forlongerexplanationsorcommentingoutblocksofcode.Commentsshouldexplainthe'why',notthe'what',andbeplacedabovetherelevantcodeforclari

Python vs. JavaScript: A Comparative Analysis for DevelopersPython vs. JavaScript: A Comparative Analysis for DevelopersMay 09, 2025 am 12:22 AM

The main difference between Python and JavaScript is the type system and application scenarios. 1. Python uses dynamic types, suitable for scientific computing and data analysis. 2. JavaScript adopts weak types and is widely used in front-end and full-stack development. The two have their own advantages in asynchronous programming and performance optimization, and should be decided according to project requirements when choosing.

Python vs. JavaScript: Choosing the Right Tool for the JobPython vs. JavaScript: Choosing the Right Tool for the JobMay 08, 2025 am 12:10 AM

Whether to choose Python or JavaScript depends on the project type: 1) Choose Python for data science and automation tasks; 2) Choose JavaScript for front-end and full-stack development. Python is favored for its powerful library in data processing and automation, while JavaScript is indispensable for its advantages in web interaction and full-stack development.

Python and JavaScript: Understanding the Strengths of EachPython and JavaScript: Understanding the Strengths of EachMay 06, 2025 am 12:15 AM

Python and JavaScript each have their own advantages, and the choice depends on project needs and personal preferences. 1. Python is easy to learn, with concise syntax, suitable for data science and back-end development, but has a slow execution speed. 2. JavaScript is everywhere in front-end development and has strong asynchronous programming capabilities. Node.js makes it suitable for full-stack development, but the syntax may be complex and error-prone.

JavaScript's Core: Is It Built on C or C  ?JavaScript's Core: Is It Built on C or C ?May 05, 2025 am 12:07 AM

JavaScriptisnotbuiltonCorC ;it'saninterpretedlanguagethatrunsonenginesoftenwritteninC .1)JavaScriptwasdesignedasalightweight,interpretedlanguageforwebbrowsers.2)EnginesevolvedfromsimpleinterpreterstoJITcompilers,typicallyinC ,improvingperformance.

JavaScript Applications: From Front-End to Back-EndJavaScript Applications: From Front-End to Back-EndMay 04, 2025 am 12:12 AM

JavaScript can be used for front-end and back-end development. The front-end enhances the user experience through DOM operations, and the back-end handles server tasks through Node.js. 1. Front-end example: Change the content of the web page text. 2. Backend example: Create a Node.js server.

Python vs. JavaScript: Which Language Should You Learn?Python vs. JavaScript: Which Language Should You Learn?May 03, 2025 am 12:10 AM

Choosing Python or JavaScript should be based on career development, learning curve and ecosystem: 1) Career development: Python is suitable for data science and back-end development, while JavaScript is suitable for front-end and full-stack development. 2) Learning curve: Python syntax is concise and suitable for beginners; JavaScript syntax is flexible. 3) Ecosystem: Python has rich scientific computing libraries, and JavaScript has a powerful front-end framework.

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

Video Face Swap

Video Face Swap

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

Hot Article

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor