当前位置:首页 > 代码 > 正文

js焦点图效果代码(js焦点图切换)

admin 发布:2022-12-19 03:15 129


本篇文章给大家谈谈js焦点图效果代码,以及js焦点图切换对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

左右箭头翻页焦点图js代码 不要flash的

""body{margin:0;padding:0;font-size:12px;color:#666;background:#ccc;} img{border:none;} a{text-decoration:none;color:#666;font-size:12px;} #box{margin:100px auto;width:450px;height:280px;background:#6666cc;overflow:hidden; position:relative;border:6px solid #ddd;} #box #img{width:1820px;height:280px;display:block;overflow:hidden;background:#fff;} #box #img a{float:left;width:450px;height:280px;display:block;overflow:hidden;} #box #num{position:absolute;left:340px;top:250px;} #box #num a{width:18px;height:18px;display:block;text-align:center;line-height:18px;float:left;margin-left:5px;background:#ddd;filter:alpha(opacity=40);opacity:0.4;overflow:hidden;} #box #num a:hover,#box #num a.hover{opacity:0.9;filter:alpha(opacity=90);background:#fff;color:#3399ff;}1 2 3 4src="" / src="" /D2/pic/item/8bbc98c088041f843bdb4960.jpg" target="_blank"

" /function S$(i){return document.getElementById(i)} function S$$(e,p){return p.getElementsByTagName(e)}var slideImage=function(){var d,s,da,sa,st=10,w,sp,acls,MID,AID,isAuto=1,dir=1,lst=0,pos,cur=0,A,C,t=800,k=0,at=3000; return{ init:function(dst,src,width,time,interval,aclass){ w=width;st=interval;t=time/st;acls=aclass; d=S$(dst); da=S$$("a",d); s=S$(src); sa=S$$("a",s); d.onmouseover=function(){clearInterval(AID);}; d.onmouseout=function(){AID=setInterval("slideImage.autoplay()",at);}; AID=setInterval("slideImage.autoplay()",at); for(var i=0;isa[i].onmouseover=function(){ j=0;while(jclearInterval(AID);slideImage.slide(j-1); }; sa[i].onmouseout=function(){AID=setInterval("slideImage.autoplay()",at);}; } }, slide:function(i){ if(i!=lst){ sa[lst].className="";sa[i].className=acls; lst=i;cur=i; C=-i*w; A=(-C+parseInt(d.style.marginLeft))/t/t/t;k=0; clearInterval(MID);MID=setInterval(function(){slideImage.mv();},st); } }, mv:function(){ sp=A*Math.abs(Math.pow(k-t,3)); if(Math.abs(sp)d.style.marginLeft=sp+C;k++; }, autoplay:function(){ if(cur==3)dir=-1;if(cur==0)dir=1; this.slide(cur+dir); } } }();

Jquery.SuperSlide扩展效果里的实用焦点图效果代码,求大神,谢谢

以下是全部代码,请自行修改图片及js路径

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" ""

html xmlns=""

head

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

meta http-equiv="Content-Language" content="zh-CN"

meta name="Keywords" content="SuperSlide,jQuery-实用焦点图"

meta name="Description" content="SuperSlide,jQuery-实用焦点图"

titleSuperSlide - 实用焦点图/title

script src=""/script

script src="jquery.SuperSlide.2.1.1.js"/script

/head

body

style type="text/css"        

*{margin:0; padding:0; list-style:none; }

body{ background:#fff; font:normal 12px/22px 宋体;  }

img{ border:0;  }

a{ text-decoration:none; color:#333;  }

a:hover{ color:#1974A1;  }

.focusBox { position: relative; width: 320px; height: 240px; overflow: hidden; font: 12px/1.5 Verdana, Geneva, sans-serif; text-align: left; background: white; }

.focusBox .pic img { width: 320px; height: 240px; display: block; }

.focusBox .txt-bg { position: absolute; bottom: 0; z-index: 1; height: 36px; width:100%;  background: #333; filter: alpha(opacity=40); opacity: 0.4; overflow: hidden; }

.focusBox .txt { position: absolute; bottom: 0; z-index: 2; height: 36px; width:100%; overflow: hidden; }

.focusBox .txt li{ height:36px; line-height:36px; position:absolute; bottom:-36px;}

.focusBox .txt li a{ display: block; color: white; padding: 0 0 0 10px; font-size: 12px; font-weight: bold; text-decoration: none; }

.focusBox .num { position: absolute; z-index: 3; bottom: 8px; right: 8px; }

.focusBox .num li{ float: left; position: relative; width: 18px; height: 15px; line-height: 15px; overflow: hidden; text-align: center; margin-right: 1px; cursor: pointer; }

.focusBox .num li a,.focusBox .num li span { position: absolute; z-index: 2; display: block; color: white; width: 100%; height: 100%; top: 0; left: 0; text-decoration: none; }

.focusBox .num li span { z-index: 1; background: black; filter: alpha(opacity=50); opacity: 0.5; }

.focusBox .num li.on a,.focusBox .num a:hover{ background:#f60;  }    

/style

div class="focusBox" style="margin:0 auto"

    ul class="pic"

        lia href="#" target="_blank"img src="images/1.jpg"//a/li

        lia href="#" target="_blank"img src="images/2.jpg"//a/li

        lia href="#" target="_blank"img src="images/3.jpg"//a/li

        lia href="#" target="_blank"img src="images/4.jpg"//a/li

    /ul

    div class="txt-bg"/div

    div class="txt"

        ul

            lia href="#"SuperSlide美女福利图Quiet/a/li

            lia href="#"SuperSlide美女福利图DoubleLi/a/li

            lia href="#"SuperSlide美女福利图爱的练习曲/a/li

            lia href="#"SuperSlide美女福利图夜莺/a/li

        /ul

    /div

    ul class="num"

        lia1/aspan/span/li

        lia2/aspan/span/li

        lia3/aspan/span/li

        lia4/aspan/span/li

    /ul

/div

script type="text/javascript"

jQuery(".focusBox").slide({

    titCell : ".num li",

    mainCell : ".pic",

    effect : "fold",

    autoPlay : true,

    trigger : "click",

    startFun : function (i) {

        jQuery(".focusBox .txt li").eq(i).animate({

            "bottom" : 0

        }).siblings().animate({

            "bottom" : -36

        });

    }

});

/script

/body

/html

焦点图尺寸是多少像素

焦点图尺寸区域为980*900PX焦点图540*260PX的像素

图片尺寸:背景图片尺寸建议为1600*900PX

扩展小资料:

焦点图,一个较大的焦点图片展示,在它的下面有四个小的图片,点击下面小的图片,上面大的图片会随之变化”

网站焦点图是一种网站内容的展现形式,可简单理解为一张图片或多张图片展现在网页上就是网站焦点图。在网站很明显的位置,用图片组合播放的形式,类似焦点新闻的意思只不过加上了图片。一般多网站首页版面或频道首页版面,因为是通过图片的形式,所以有一定的吸引性、视觉吸引性。容易引起访问者的点击,据国外的设计机构调查统计,网站焦点图的点击率明显高于纯文字,转化率高于使用在文字标题5倍。

中文名

网站焦点图

定    义

一种网站内容的展现形式

使用在

网站首页版面或频道首页版面

分    类

js焦点图

分类

焦点图必须有图片,无图不成焦,不然纯文字的形式就是焦点文字或焦点新闻啦。

js焦点图,使用原生态的js代码实现的焦点图。样式相对单一,如借助css可实现多样的风格。

flash焦点图,看名字就可以理解,使用flash设计或用flash as编程设计的焦点图。该焦点图优点是字体展现效果佳,比纯网页形式更具有美感。不利于SEO与引擎的抓取。

css焦点图,不难理解网页设计现在流程html+css设计,css焦点图就是这样而来的,很多情况下需要结合js代码实现。

jquery焦点图,现在很流行的实现方式,逐步取代js原生态的焦点图,因为jquery焦点图的代码书写简单,借助jquery的类库很容易实现常见的js焦点图效果。而且代码少。不过需要有一定的网页设计基础。

立体翻转效果flash+xml+js焦点图代码应用到asp网站中,并实现asp后台更新管理怎么弄?

一下还真不好说,只要通过ASP获取图片数据,遍历写在FLASH图片地址位置就可以了!

js 焦点图切换按钮控制大小图片滚动代码问题

window.onload = function() {

    var oUl = document.getElementsByTagName('ul')[0];

    var aLiUl = oUl.getElementsByTagName('li');

    var oOl = document.getElementsByTagName('ol')[0];//这里写错成ul

    var aLiOl = oOl.getElementsByTagName('li');

    var index = 0;

    // 这里修改了逻辑

    for (var i = 0; i  aLiOl.length; i++) {

        aLiOl[i].index = i;

        aLiOl[i].onmouseover = function() {

            aLiOl[index].className = "";

            this.className = 'active';

            index = this.index;

        };

    }

};

js焦点图切换图片的数字按钮代码怎么写?要有鼠标点击、经过、离开的效果的

div style="background-color: silver;padding:60px;width:130px" onclick="this.style.backgroundColor='green'" onmousemove="this.style.backgroundColor='yellow'" onmouseout="this.style.backgroundColor='silver'" 520/div

js焦点图效果代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于js焦点图切换、js焦点图效果代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://ahzz.com.cn/post/1525.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载