• 网络学院
  • IT资讯
  • 操作系统
  • 网络技术
  • 软件应用
  • 办公软件
  • 编程技术
  • 网站架设
  • 数据库类
  • 平面设计
  • 多媒体类
  • 游戏资讯
  • 教学论文
  • 认证考试
DHTML打造PictureSpelling
  站点:
  • 首 页
  • 最新软件
  • 文章教程
  • 国内软件
  • 国外软件
  • 绿色软件
  • 源码下载
  • 字体下载
DHTML打造PictureSpelling
软件发布 DHTML打造PictureSpelling
网络软件 系统工具 应用软件 联络聊天 图形图像 多媒体类 行业软件 游戏娱乐 编程开发 安全相关 教育教学 数码软件 绿软下载
热门软件: QQ 瑞星 pplive e话通 木马克星 千千静听 office2000 五笔字根 Photoshop 视频分割
返回文章教程首页 >> 文章首页 >> 网站架设 >> HTML/CSS >> DHTML打造PictureSpelling

DHTML打造PictureSpelling

添加时间: 2005-6-9 4:59:27  作者: 网络收集  阅读次数:69   来源: http://d9soft.com

       

不用切图,只要设置基本的 图片及其属性即可!

用鼠标右键控制图片翻转!

<style>
*{
 FONT-SIZE: 12px;
}
select {
 width: 100px; BACKGROUND-COLOR: #eeeeee;
}
div {
 padding: 2px;
}
</style>
<script language="JavaScript1.2">
/*
 This following code are designed and writen by Windy_sk <seasonx@163.net>
 You can use it freely, but u must held all the copyright items!
*/
var ie  = (document.getElementById && document.all);
var ns  = (document.getElementById && !document.all);
function GetRndNum(Min,Max){
 var Range = Max - Min;
 var Rand = Math.random();
 return(Min + Math.round(Rand * Range));
}
function PicItem(pic, width, height) {
 this.img = new Image();
 this.pic = pic;
 this.width = width;
 this.height = height;
}
var Pic_list = new Array();
var n=0, Pic_cur=0, Clips=3;
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0001.jpg", 430, 261);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0002.jpg", 430, 331);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0003.jpg", 430, 378);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0004.jpg", 430, 514);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0005.jpg", 430, 255);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0006.jpg", 430, 450);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0007.jpg", 430, 386);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0008.jpg", 430, 386);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0009.jpg", 430, 441);
Pic_list[n++] = new PicItem("http://www.mbavoice.net/windy/clip/pic0010.jpg", 430, 472);
var Pic_clip_all = new Array();
var Pic_clip  = document.createElement("div");
var Layer_cur  = null;
var pX = 0 ; pY = 0; Zidx = 1;
Pic_clip.innerHTML = "<img src='' border='0' style='top:0px;left:0px;position:relative' />";
Pic_clip.style.cssText = "background-color:white; cursor:pointer; position:absolute; overflow: hidden; padding:0px; border:1px black solid; zIndex:" + Zidx;
var the_width=100, the_height=100, Clip_num=0;
var Flip_list = ["FlipV", "FlipV FlipH", "FlipH", "",];
var Zwidth = screen.width * 0.8, Zheight = screen.height * 0.8 , Zrate=0;
function ChangeMode(idx) {
 for(var i=0; i<Pic_clip_all.length; i++) {
  for(var j=0; j<Pic_clip_all[i].length; j++) {
   Pic_clip_all[i][j].parentNode.removeChild(Pic_clip_all[i][j]);
  }
 }
 var if_zoom = document.getElementById("zoom").checked;
 if(if_zoom) {
  the_width = Math.floor(Zwidth *(Zrate>1?1:Zrate)/idx);
  the_height = Math.floor(Zheight/(Zrate>1?Zrate:1)/idx);
 } else {
  the_width = Math.floor(Pic_list[Pic_cur].width/idx);
  the_height = Math.floor(Pic_list[Pic_cur].height/idx);
 }
 Pic_clip_all = new Array(idx);
 Clip_num = Math.pow(idx, 2);
 for(i=0; i<idx; i++) {
  Pic_clip_all[i] = new Array(idx);
  for(j=0; j<idx; j++) {
   Pic_clip_all[i][j] = Pic_clip.cloneNode(true);
   with(Pic_clip_all[i][j].style) {
    width = the_width;
    height = the_height;
    top = GetRndNum(100, 400);
    left = GetRndNum(100, 600);
   }
   with(Pic_clip_all[i][j]) {
    if(if_zoom) {
     firstChild.width  = Math.floor(Zwidth *(Zrate>1?1:Zrate));
     firstChild.height = Math.floor(Zheight/(Zrate>1?Zrate:1));
    }
    id = "clip_" + i + "_" + j;
    if(ie) {
     onmousedown = new Function("if(this.snap=='yes')return; this.style.zIndex=Zidx++; Layer_cur=this; pX=event.clientX-this.offsetLeft; pY=event.clientY-this.offsetTop;");
     oncontextmenu = new Function("event.returnValue=false; if(this.snap=='yes')return; var flip_idx=(parseInt(this.flip_idx)+1)%4; this.style.filter=Flip_list[flip_idx]; this.flip_idx=flip_idx;");

DHTML打造PictureSpelling(1) 第 [1] [2] [3] [4]  下一页

 

上下文章:

 

上一篇文章: 事件触发列表与解说 下一篇文章: 鼠标实现图片的渐有渐无

相关文章:

  • 用CMailServer打造邮件服务器
  • 步步教你用Photoshop打造当今非主流MM卡哇伊的靓照
  • 教你三分钟打造反垃圾邮件服务器
  • Photoshop打造非主流MM个性照片
  • Photoshop打造跳动中国心动画教程

相关软件:

  • DHTML Menu Builder V4.20.015
  • ASP与DHTML资料集锦(WDL)

 

快速导航

  • 网络学院
  • 精品汇聚
  • 字体下载
  • 教程下载
  • ASP源码
  • PHP源码
  • Net源码
  • JSP 源码

网站架设分类导航

  • DreamWeaver
  • HTML/CSS
  • Flash
  • Firework
  • FrontPage
  • 建站指南

本类经典文章推荐

  • 总结:CSS在IE与Firefox下的兼容性
  • 经典:CSS应用常见问题大总结
  • 网站设计的标准时代
  • 用层模拟下拉列表框
  • 苏沈小雨样式表中文手册系列
  • 用CSS控制网页总体风格
  • WEB界面设计五种特征
  • 深入透析样式表滤镜(上)
  • HTML的基本元素
  • 网页中多层效果的灵活使用

HTML/CSS阅读排行

  • 用层模拟下拉列表框
  • 突破网页文字无法复制局限
  • 流程图软件Visio作“高难度”网页
  • 苏沈小雨样式表中文手册系列
  • WEB界面设计五种特征
  • 用CSS控制网页总体风格
  • 图片模糊转清晰
  • 制作精美圆角表格两种方法
  • 网页制作小工具大全(下)
  • 网页制作小工具大全(中)

网站架设阅读总排行

  • 用层模拟下拉列表框
  • 教你如何用Dreamweaver制作电子相...
  • 用Dreamweaver插件制作动态下拉菜...
  • 突破网页文字无法复制局限
  • 如何设计首页???(解答)
  • Dreamweaver基础技巧-布局阶段
  • 动态QQ表情DIY Fireworks轻松搞定
  • 流程图软件Visio作“高难度”网页
  • 网页制作隐藏对象巧利用
  • 站点-网页布局设计基础

广告位置

字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 回到顶部

关于我们 | 版权声明 | 免责条款 | 广告联系 | 软件发布 | 下载帮助 | 下载排行 | 网站地图 | 特别鸣谢 | 友情连接

copyright; 2005-2008 D9soft.com 第九软件网 版权所有