网页底部特效
① 隐藏在底部的DIV点击弹出jquery特效
(function($) {
$.belowthefold = function(element, settings) {
var fold = $(window).height() + $(window).scrollTop();
return fold <= $(element).offset().top - settings.threshold;
}; $.abovethetop = function(element, settings) {
var top = $(window).scrollTop();
return top >= $(element).offset().top + $(element).height() - settings.threshold;
};
$.rightofscreen = function(element, settings) {
var fold = $(window).width() + $(window).scrollLeft();
return fold <= $(element).offset().left - settings.threshold;
};
$.leftofscreen = function(element, settings) {
var left = $(window).scrollLeft();
return left >= $(element).offset().left + $(element).width() - settings.threshold;
};
$.inviewport = function(element, settings) {
return !$.rightofscreen(element, settings) && !$.leftofscreen(element, settings) && !$.belowthefold(element, settings) && !$.abovethetop(element, settings);
};
$.extend($.expr[':'], {
"below-the-fold": function(a, i, m) {
return $.belowthefold(a, {threshold : 0});
},
"above-the-top": function(a, i, m) {
return $.abovethetop(a, {threshold : 0});
},
"left-of-screen": function(a, i, m) {
return $.leftofscreen(a, {threshold : 0});
},
"right-of-screen": function(a, i, m) {
return $.rightofscreen(a, {threshold : 0});
},
"in-viewport": function(a, i, m) {
return $.inviewport(a, {threshold : 0});
}
});
})(jQuery);
② 在html中添加粒子特效的script代码,如何将其置于网页页面底层
css设置zindex层级,层级越高越在前
③ javascript特效转到屏幕底部
定义一个跳转函数,只需要在按扭那里添加个事件调用这个函数,就可以跳到你所指定的地方;这里首先要说的是,你要在页面底部有一个元素可以或得焦点。我给你写了个简单的一段,自己按照这个方法去走吧!<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> 按键跳转 </TITLE>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<script type="text/javascript">
<!--
function move(){
document.form.text.focus();
}
//-->
</script>
</HEAD>
<center>
<BODY>
<form name = form >
<input type = "button" value = "跳到最后" name = "button" onclick = "move()"><br>
<br>
<br>
<br>
<br>
<br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<h1>已经跳在最后的文本框了<h1>
<br><br><br><br><br><br><br>
<input type = "text" name = "text" value = "跳在这里了" >
<br>
<br>
<br>
</form>
</center>
</BODY>
</HTML>
你也太那个了,一分也不拿出来给~~~~~~~~~~~~~~~
④ 求DIV随窗口滚动底部悬浮特效
$(function(){
window.onresize=function(){
footview();
}
functionfootview(){
if(view().h>662){
$('#foot_layout').addClass('foot_ch');
}
if(view().h<662){
$('#foot_layout').removeClass('foot_ch');
}
}
footview();
});
functionview(){
return{
w:document.documentElement.clientWidth,
h:document.documentElement.clientHeight
}
}
.foot_ch{
bottom:0;
margin:0auto;
position:fixed;
width:100%;
}
⑤ 求源码js插件 如下面网址网页的特效请用手指擦一擦怎么做
http://runjs.cn/detail/ya8riwva
跟这个差不多一样
⑥ 求助:给个固定在网页底部的代码
http://www.codefans.net/jscss/code/2021.shtml看这个代码可以点击切换到小图标的,我试过了,可以用
具体的框里的东西可以自己再美化 大概的功能是有的
⑦ 一个网页的页面中能用几个JS 特效
js在同一个网页中不会有条数的限制 在网上找到的特效,放在一起用有可能产生参数冲突,所有影响效果 又 影响网页打开的速度。 使用js一定要自己明白是什么意思!
⑧ 我想做一个网页 如何做到进主页前先全屏放一段特效然后下面现实点击进入再进去
先做一个引导页,放置FLASH全屏动画
播放结束放置一个按钮
点击跳转首页
⑨ 网页特效 文字段落上下滚动时不循环滚动,到底部终止
<!DOCTYPE>
<html>
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/>
<title>向上下左右不间断无缝滚动效果(兼容火狐和IE)</title>
</head>
<body>
<divid="colee"style="overflow:hidden;height:253px;width:410px;">
<divid="colee1">
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
<p>此处放文字。。。。。。。。。</p>
</div>
<divid="colee2"></div>
</div>
<script>
varspeed=30;
varcolee2=document.getElementById("colee2");
varcolee1=document.getElementById("colee1");
varcolee=document.getElementById("colee");
colee2.innerHTML=colee1.innerHTML;//克隆colee1为colee2
functionMarquee1(){
//当滚动至colee1与colee2交界时
if(colee2.offsetTop-colee.scrollTop<=0){
colee.scrollTop-=colee1.offsetHeight;//colee跳到最顶端
}else{
colee.scrollTop++
}
}
varMyMar1=setInterval(Marquee1,speed)//设置定时器
//鼠标移上时清除定时器达到滚动停止的目的
colee.onmouseover=function(){clearInterval(MyMar1)}
//鼠标移开时重设定时器
colee.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
</script>
<!--向上滚动代码结束-->
<br>
<!--下面是向下滚动代码-->
<divid="colee_bottom"style="overflow:hidden;height:253px;width:410px;">
<divid="colee_bottom1">
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
<p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p>
</div>
<divid="colee_bottom2"></div>
</div>
<script>
varspeed=30
varcolee_bottom2=document.getElementById("colee_bottom2");
varcolee_bottom1=document.getElementById("colee_bottom1");
varcolee_bottom=document.getElementById("colee_bottom");
colee_bottom2.innerHTML=colee_bottom1.innerHTML
colee_bottom.scrollTop=colee_bottom.scrollHeight
functionMarquee2(){
if(colee_bottom1.offsetTop-colee_bottom.scrollTop>=0)
colee_bottom.scrollTop+=colee_bottom2.offsetHeight
else{
colee_bottom.scrollTop--
}
}
varMyMar2=setInterval(Marquee2,speed)
colee_bottom.onmouseover=function(){clearInterval(MyMar2)}
colee_bottom.onmouseout=function(){MyMar2=setInterval(Marquee2,speed)}
</script>
<!--向下滚动代码结束-->
<br>
<!--下面是向左滚动代码-->
<divid="colee_left"style="overflow:hidden;width:500px;">
<tablecellpadding="0"cellspacing="0"border="0">
<tr><tdid="colee_left1"valign="top"align="center">
<tablecellpadding="2"cellspacing="0"border="0">
<tralign="center">
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
</tr>
</table>
</td>
<tdid="colee_left2"valign="top"></td>
</tr>
</table>
</div>
<script>
//使用div时,请保证colee_left2与colee_left1是在同一行上.
varspeed=30//速度数值越大速度越慢
varcolee_left2=document.getElementById("colee_left2");
varcolee_left1=document.getElementById("colee_left1");
varcolee_left=document.getElementById("colee_left");
colee_left2.innerHTML=colee_left1.innerHTML
functionMarquee3(){
if(colee_left2.offsetWidth-colee_left.scrollLeft<=0)//offsetWidth是对象的可见宽度
colee_left.scrollLeft-=colee_left1.offsetWidth//scrollWidth是对象的实际内容的宽,不包边线宽度
else{
colee_left.scrollLeft++
}
}
varMyMar3=setInterval(Marquee3,speed)
colee_left.onmouseover=function(){clearInterval(MyMar3)}
colee_left.onmouseout=function(){MyMar3=setInterval(Marquee3,speed)}
</script>
<!--向左滚动代码结束-->
<br>
<!--下面是向右滚动代码-->
<divid="colee_right"style="overflow:hidden;width:500px;">
<tablecellpadding="0"cellspacing="0"border="0">
<tr><tdid="colee_right1"valign="top"align="center">
<tablecellpadding="2"cellspacing="0"border="0">
<tralign="center">
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
<td><p><imgsrc="/jscss/demoimg/200907/bg3.jpg"></p></td>
</tr>
</table>
</td>
<tdid="colee_right2"valign="top"></td>
</tr>
</table>
</div>
<script>
varspeed=30//速度数值越大速度越慢
varcolee_right2=document.getElementById("colee_right2");
varcolee_right1=document.getElementById("colee_right1");
varcolee_right=document.getElementById("colee_right");
colee_right2.innerHTML=colee_right1.innerHTML
functionMarquee4(){
if(colee_right.scrollLeft<=0)
colee_right.scrollLeft+=colee_right2.offsetWidth
else{
colee_right.scrollLeft--
}
}
varMyMar4=setInterval(Marquee4,speed)
colee_right.onmouseover=function(){clearInterval(MyMar4)}
colee_right.onmouseout=function(){MyMar4=setInterval(Marquee4,speed)}
</script>
<!--向右滚动代码结束-->
</body>
</html>