'js'相关日志共 6篇

  1. 2007/11/26 模拟FireFox载入动画-js
  2. 2007/09/10 css+javascript实现苹果电脑桌面菜单滑动效果
  3. 2007/09/10 Javascript代码 实现图片玻璃特效
  4. 2007/08/03 背景音乐每次刷新都可以自动更换
  5. 2007/08/03 Javascript图片播放类ImageSlide.iclass.js
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
body{margin:0px;background:#fff;padding-top:100px;}
#dot,#dot u,#dot b,#dot i{overflow:hidden;}
#dot {width:16px;height:16px;text-align:center;}
#dot b,i{display:block;background:#666666;}
#dot u{margin:0px;padding:0px;width:4px;height:4px;float:left;}
#dot b{height:1px;width:2px;margin-left:1px;}
#dot i{height:2px;width:4px;}
#dot #dot1,#dot #dot7{margin-left:2px;}
#dot #dot1{padding-top:2px;}
#dot #dot3,#dot #dot6{padding-top:2px;}
#dot #dot4{padding-left:8px;}

.copy{clear:both;padding-top:30px;line-height:22px;}
</style>
</head>
<script>
/*
Object : 模拟FireFox载入动画
By : Missde
Date : 2006
Link : www.missde.cn
*/
var dotdiv=
       "<div id='dot'>"
    +"<u id='dot1'><b></b><i></i><b></b></u>"
    +"<u id='dot2'><b></b><i></i><b></b></u>"
    +"<u id='dot3'><b></b><i></i><b></b></u>"
    +"<u id='dot8'><b></b><i></i><b></b></u>"
    +"<u id='dot4'><b></b><i></i><b></b></u>"
    +"<u id='dot7'><b></b><i></i><b></b></u>"
    +"<u id='dot6'><b></b><i></i><b></b></u>"
    +"<u id='dot5'><b></b><i></i><b></b></u>"
+"</div>";
function gID(str){
    return document.getElementById(str);
}
function loadingdot(a){
    if(a<=1 || a>8)a=1;
    loadingdot_a2=a-0+1;
    for(var i=1;i<=8;i++){
     var d=loadingdot_a2+i;
     if(d>10)d-=8;
     gID("dot"+i).style.MozOpacity=d/10;
     gID("dot"+i).style.filter="alpha(opacity=" +(d*10)+")"
    }
    setTimeout("loadingdot(loadingdot_a2)",100);
}
function loading(){
    document.write(dotdiv);
    loadingdot(1);
}
</script>
<body>
<script>loading()</script>

</body>
</html>


模拟FireFox载入动画
2007/11/26 05:02 2007/11/26 05:02
※网摘※/※Web※ l 2007/11/26 05:02
TAG

作者:http://www.ndesign-studio.com 转载:http://www.webstudio.com.cn

css dock menu.仿制苹果系统导航,,css结合javascript同样也可以实现与flash同等的效果,使用的是jquery和fisheye 组件来实现的.

demo

download

2007/09/10 10:30 2007/09/10 10:30
※网摘※/※Web※ l 2007/09/10 10:30

转摘:egoldy  原文地址:http://www.netzgesta.de/glossy/

032.jpg

Javascript glossy effect,使用jasvascript 制作玻璃按钮的效果,为什么要使用javascript生成玻璃按钮效果,应当说最主要的是方便,不需要单独的去处理图像了.

下载

2007/09/10 10:25 2007/09/10 10:25
※网摘※/※Web※ l 2007/09/10 10:25
<SCRIPT LANGUAGE="javascript">
<!--
var sound1="http://歌曲地址"  
var sound2="http://歌曲地址"  
var sound3="http://歌曲地址"  
var sound4="http://歌曲地址"  
var sound5="http://歌曲地址"  
var sound6="http://歌曲地址"  
var sound7="http://歌曲地址"  
var sound8="http://歌曲地址"  
var sound9="http://歌曲地址"  
var sound10="http://歌曲地址"  
var x=Math.round(Math.random()*10)
if (x==0) x=sound1
else if (x==1) x=sound2
else if (x==2) x=sound3
else if (x==3) x=sound4
else if (x==4) x=sound5
else if (x==5) x=sound6
else if (x==6) x=sound7
else if (x==7) x=sound8
else if (x==8) x=sound9
else x=sound10
if (navigator.appName=="Microsoft Internet Explorer"
document.write('<bgsound src='+'"'+x+'"'+' loop="infinite">')
else
document.write('<embed src='+'"'+x+'"'+'hidden="true" autostart="true" loop="true">')
//-->
</SCRIPT>
2007/08/03 07:37 2007/08/03 07:37
※网摘※/※Web※ l 2007/08/03 07:37
TAG ,

//构造ImageSlide类
function ImageSlide () {
 if((/MSIE\s*[5-9]/).test(navigator.appVersion)) {
  this.count = 0;
  this.timer = null;
  this.first = new Object();
  this.frms = new Array();

  this.imgs = new Array();
  this.width = 640;
  this.height = 480;
  this.boxId = "imageSlideBox";
  this.delay = 5;
  this.autoPlay = true;
  this.transform = 23;
  /**
   * 播放切换效果说明
   * --------------
   *  0. 矩形缩小
   *  1. 矩形扩大
   *  2. 圆形缩小
   *  3. 圆形扩大
   *  4. 从下到上
   *  5. 从上到下
   *  6. 从左到右
   *  7. 从右到左
   *  8. 竖百叶窗
   *  9. 横百叶窗
   * 10. 错位横百叶窗
   * 11. 错位竖百叶窗
   * 12. 点扩散
   * 13. 两边到中间
   * 14. 中间到两边
   * 15. 中间到上下
   * 16. 上下到中间
   * 17. 右下到左上
   * 18. 右上到左下
   * 19. 左上到右下
   * 20. 左下到右上
   * 21. 横条
   * 22. 竖条
   * 23. 随机
   * --------------
   */
 }
 else {
  alert("请使用IE5或IE5以上版本的浏览器使用本程序!");
 }
}

//加入一张或多张图片(传入一个或多个图片路径)
//pushImg(sPath1 [, sPath2 [, sPath3 [, ...]]])
ImageSlide.prototype.pushImgs = function () {
 for (var i = 0; i < arguments.length; i++)
  this.imgs.push(arguments[i]);
}

//设置图片播放容器的长宽
ImageSlide.prototype.setSize = function (nWidth, nHeight) {
 this.width = nWidth;
 this.height = nHeight;
}

//设置图片播放容器的ID
ImageSlide.prototype.setBoxId = function (sBoxId) {
 this.boxId = sBoxId;
}

//设置是否自动播放
ImageSlide.prototype.setAutoPlay = function (bAutoPlay) {
 this.autoPlay = bAutoPlay;
}

//设置自动播放的延时秒数
ImageSlide.prototype.setDelay = function (nSeconds) {
 this.delay = nSeconds;
}

//设置播放的切换效果(0-23的整数)
ImageSlide.prototype.setTransform = function (nTransform) {
 this.transform = nTransform;
}

//显示
ImageSlide.prototype.display = function () {
 var boxStr = "<div style='width:" + this.width + "px;height:" + this.height + "px;' ";
 boxStr += "id='"  + this.boxId + "'><div ";
 if (this.autoPlay)
  boxStr += "onclick='window.imageSlide.play();window.imageSlide.timerPlay();'";
 else
  boxStr += "onclick='window.imageSlide.play();'";
 boxStr += "style='word-break:keep-all;width:100%;height:100%;background-color:#EEEEEE;'>";
 if (this.autoPlay)
  boxStr += "<br /> 点击此处开始进行自动播放……";
 else
  boxStr += "<br /> 点击此处开始播放,播放时单击播放下一张……";
 boxStr += "</div>";
 var img;
 var transform = this.transform;
 for (var i = 0; i < this.imgs.length; i++) {
  if (this.transform >= 23)
   var transform = Math.floor(Math.random()*23);
  boxStr += "<img src='" + this.imgs[i] + "' style='display:none;width:";
  boxStr += this.width + ";height:" + this.height + "px;height:px;filter:";
  boxStr += "revealTrans(transition=" + transform + ",duration=1);'";
  if (!this.autoPlay)
   boxStr += "' onclick='window.imageSlide.play();' alt='点击播放下一张'";
  boxStr += " />";
 }
 boxStr += "</div>";
 document.writeln(boxStr);
 var box = document.getElementById(this.boxId);
 this.first = box.childNodes[0];
 this.frms = box.getElementsByTagName("IMG");
}

//播放
ImageSlide.prototype.play = function () {
 if (window.imageSlide.imgs.length) {
  window.imageSlide.first.style.display = "none";
  if (window.imageSlide.count >= window.imageSlide.imgs.length) {
   alert("播放完毕!");
   window.imageSlide.frms[window.imageSlide.count-1].style.display = "none";
   window.imageSlide.first.style.display = "block";
   window.imageSlide.first.innerHTML = "<br /> 点击此处再次进行播放!";
   clearInterval(window.imageSlide.timer);
   window.imageSlide.count = 0;
  }
  else if (window.imageSlide.count == 0) {
   window.imageSlide.first.style.display = "none";
   window.imageSlide.frms[0].filters[0].apply();
   window.imageSlide.frms[0].style.display = "block";
   window.imageSlide.frms[0].filters[0].play();
  }
  else {
   window.imageSlide.frms[window.imageSlide.count-1].style.display = "none";
   window.imageSlide.frms[window.imageSlide.count].filters[0].apply();
   window.imageSlide.frms[window.imageSlide.count].style.display = "block";
   window.imageSlide.frms[window.imageSlide.count].filters[0].play();
  }
  window.imageSlide.count++;
 }
 else {
  alert("你没有放入任何图片,无法进行播放!");
 }
}

//连续播放
ImageSlide.prototype.timerPlay = function () {
 this.timer = setInterval(this.play, this.delay * 1000);
}

//实例化一个ImageSlide对象imageSlide并将其做为window对象的一个子对象
window.imageSlide = new ImageSlide();

2007/08/03 07:36 2007/08/03 07:36
※网摘※/※Web※ l 2007/08/03 07:36
TAG ,
1 2 

????

所有分类 (72)
※心情※ (5)
※TēāMe※ (12)
※资源分享※ (2)
※Design※ (4)
※影音视频※ (20)
※网摘※ (28)

??

«   2010/07   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
沪ICP备07033333号
get rsslazylogs