爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
一个JS高手在IE9开发大赛上写的JS特效参赛作品
一个JS高手在IE9开发大赛上写的JS特效参赛作品
日期:2014-05-18 浏览次数:20190 次
以下是程序代码
<!DOCTYPE HTML> <html> <head> <title>Rag Doll</title> <meta name="Author" content="hongru.chenhr"> <meta http-equiv="Content-type" content="text/javascript; charset=utf-8"> <style type="text/css"> html { overflow: hidden; } body { margin: 0px; padding: 0px; background: #222; position: absolute; width: 100%; height: 100%; } #screen { position: absolute; left: 6%; top: 10%; width: 88%; height: 80%; background: #000; overflow: hidden; cursor: default; } #title { position: absolute; font-family: verdana; width: 100%; font-size: 7em; font-weight: bold; color: #181818; text-align: center; z-index:0; } </style> <script type="text/javascript"> var __SVG = false; var __svgNS = false; if (document.createElementNS) { __svgNS = "http://www.w3.org/2000/svg"; __svg = document.createElementNS(__svgNS, "svg"); __SVG = (__svg.x != null); } if (__SVG) { /* ============= SVG ============== */ vectorGraphics = function(o, antialias) { this.canvas = document.createElementNS(__svgNS, "svg"); this.canvas.style.position = "absolute"; o.appendChild(this.canvas); this.createLine = function(w, col, linecap) { var o = document.createElementNS(__svgNS, "line"); o.setAttribute("shape-rendering", antialias?"auto":"optimizeSpeed"); o.setAttribute("stroke-width", Math.round(w)+"px"); if (col) o.setAttribute("stroke", col); if (linecap) o.setAttribute("stroke-linecap", linecap); o.move = function(x1, y1, x2, y2) { this.setAttribute("x1", Math.round(x1) + .5); this.setAttribute("y1", Math.round(y1)); this.setAttribute("x2", Math.round(x2)); this.setAttribute("y2", Math.round(y2)); } o.color = function(c){ this.setAttribute("stroke", c); } o.RGBcolor = function(R, G, B){ this.setAttribute("stroke", "rgb("+Math.round(R)+","+Math.round(G)+","+Math.round(B)+")"); } o.stroke_weight = function(s){ this.setAttribute("stroke-width", Math.round(s)+"px"); } this.canvas.appendChild(o); return o; } this.createPolyline = function(w, points, col, fill) { var o = document.createElementNS(__svgNS, "polyline"); o.setAttribute("shape-rendering", antialias?"auto":"optimizeSpeed"); o.setAttribute("stroke-width", Math.round(w)); if (col) o.setAttribute("stroke", col); o.setAttribute("fill", fill?fill:"none"); if (points) o.setAttribute("points", points); o.move = function(points) { this.setAttribute("points", points); } this.canvas.appendChild(o); return o; } this.createOval = function(diam, filled) { var o = document.createElementNS(__svgNS, "circle"); o.setAttribute("shape-rendering", antialias?"auto":"optimizeSpeed"); o.setAttribute("stroke-width", 0); o.setAttribute("r", Math.round(diam / 2)); o.style.cursor = "pointer"; o.move = function(x1, y1, radius) { this.setAttribute("cx", Math.round(x1)); this.setAttribute("cy", Math.round(y1)); this.setAttribute("r", Math.round(radius)); } o.stroke_color = function(col) { this.setAttribute("stroke", col); } o.fill_color = function(col) { this.setAttribute("fill", col); } o.stroke_weight = function(sw) { this.setAttribut
上一篇:狡猾的按钮特效
下一篇:js网页进度条等待特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
QQ空间与微信龟兔赛跑,商业生态链陷入死循环
Google要求硬件厂商捆绑预装应用的协议曝光
百度“全网寻人”面前的互联网信息枢纽价值
广电总局回应美剧下架:不是所有信息可公开
三星起诉LG在冰箱广告中玷污其企业笼统
马云:银行若放开存款利率 余额宝死了也光荣
充斥着假消息负能量的“秘密”缺乏普适性
京东进驻微信一级入口或影响自身战略布局
看病也能用支付宝了 马云的又一盘大棋
推荐阅读
更多>
FB上广告费用昂贵而且效果不及Twitter
微软的云服务显示出他们将自我进化
流浪汉高考状元终于找到工作:月薪3000做程序员很满意
首个释放出搅局房地产信号的互联网公司不是小米而是58同城
雅安地震救灾前线的科技之手 微弱而暖和
Android版WhatsApp曝漏洞:聊天记录可被窃取
中国移动4G资费调整方案6月1日起正式实施
马云寄厚望于物流 “菜鸟”行情暂难持续
二维码支付大战的号角注定已经吹响,尚需标准发放
惠普中国转型只是缩影 未来开展不可预期
任正非:华为决不上市 上市公司股东贪婪而短视
美剧讲硅谷创业者:远不及现实荒诞?
永不磨灭的九大尖端编程语言
NoomWeight减肥
聚美向左,唯品向右,怎能耐得住高跟和红唇的诱惑!
国美在线叫板京东:李俊涛底气在哪?
百度吴恩达:图像和音视频搜索是人工智能新方向
央行暂停二维码支付及虚拟信用卡 支付宝微信不知情
开个房刷个卡全世界都知道个人隐私成公开秘密
亚马逊推特价闪购纪念入华十周年 总裁一职仍空缺