从js代码网站找到有滑动切换内容的代码怎么套进去实际应用?在线急等_html/css_WEB-ITnose
我在js代码特效网站,找到一个鼠标滑动切换内容的代码,但是怎样把这个代码套进去网站,实际来应用呢?
做成图片上面这张可以实际应用 来切换的
回复讨论(解决方案)
图片上网站的例子网址:tzrlfk 前面www. 和.com 不知道能不能发网址
<!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=utf-8" /><title>1111</title><style>*{ margin:0; padding:0; list-style:none;}body{ font-size:12px; color:#666; text-align:left;}h1{ text-align:center;}.lanrenzhijia{ width:348px; height:230px; margin:100px auto; background:#f0f0f0; font-family:'微软雅黑';}.lanrenzhijia .tab{ overflow:hidden; background:#ccc;}.lanrenzhijia .tab a{ display:block; width: 74px; height: 26px; float:left; text-decoration:none; color:#333;text-align: center; line-height: 26px; margin-left: 6px; }.lanrenzhijia .tab a:hover{ background:#E64E3F; text-decoration:none;}.lanrenzhijia .tab a.on{ background:#E64E3F;color: #740062; text-decoration:none;background:url(images/xk.jpg)no-repeat;}.lanrenzhijia .content{ overflow:hidden; width:348px; height:204px;}.lanrenzhijia .content li{ display:none;}</style></head><body><div class="lanrenzhijia"> <div class="tab"> <a href="javascript:;" class="on">人流检查</a> <a href="javascript:;">早孕检测</a> <a href="javascript:;">人工引产</a> <a href="javascript:;">人流康复</a> </div> <div class="content"> <li style="display:block;">无痛人流后多久完全康复</li> <li>flash素材内容</li> <li>亚当学院内容</li> <li>在线客服代码内容</li> </div></div><script src="http://www.lanrenzhijia.com/ajaxjs/jquery.min.js"></script><script>$(function(){ $(".lanrenzhijia .tab a").mouseover(function(){ $(this).addClass('on').siblings().removeClass('on'); var index = $(this).index(); number = index; $('.lanrenzhijia .content li').hide(); $('.lanrenzhijia .content li:eq('+index+')').show(); }); var auto = 2; //等于1则自动切换,其他任意数字则不自动切换 if(auto ==1){ var number = 0; var maxNumber = $('.lanrenzhijia .tab a').length; function autotab(){ number++; number == maxNumber? number = 0 : number; $('.lanrenzhijia .tab a:eq('+number+')').addClass('on').siblings().removeClass('on'); $('.lanrenzhijia .content li:eq('+number+')').show().siblings().hide(); } var tabChange = setInterval(autotab,3000); //鼠标悬停暂停切换 $('.lanrenzhijia').mouseover(function(){ clearInterval(tabChange); }); $('.lanrenzhijia').mouseout(function(){ tabChange = setInterval(autotab,3000); }); }});</script></body></html>
上面是在js代码网站找到的 切换功能的代码 怎么套进去呢 请问
http://www.17sucai.com/pins/12047.html
http://www.juheweb.com/js/tab/71.html
http://www.51xuediannao.com/js/jquery/656.html
楼上那位大神 我知道这种代码 我有很多 但是不知道怎么套进去 实际应用啊
它这个好像不止是需要改变样式 连调用的对应js 都要修改才可以吧
看懂代码,你就能套进去了。js里面都有注释的,你稍微读一读,理解一下,就当学习新的东西了,这样你也会有进步的~
我真的套了很久很久,我把样式改好了,但是js不管用了,不能切换内容,
我真的套了很久很久,我把样式改好了,但是js不管用了,不能切换内容,
注意它jquery选择器的样式名,只要你不改结构和样式名称,都没什么问题,直接改样式就行
我真的套了很久很久,我把样式改好了,但是js不管用了,不能切换内容,
注意它jquery选择器的样式名,只要你不改结构和样式名称,都没什么问题,直接改样式就行
我就是要改切换内容那部分的结构 它jquery里面只是调用li标签 可我要用到好几个div 我把页面实现了 它却不会滑动了
没人可以帮我吗。

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











HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...
