爱易网
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 浏览次数:20142 次
以下是程序代码
<!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网页进度条等待特效
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
评论:阿里为什么不试着收购一家香港媒体呢
金山毒霸安全中心: XP退役后首个高危漏洞来了
诺基亚培育低端机市场 迂回战术要挟中华酷联
清点:罗永浩推锤子ROM 小米打法遭模拟
华为坚持不上市究竟为何?不差钱也不想冒风险
腾讯再次重申:普通微信誉户相对不收费
Line风靡亚洲,在北美却进展缓慢
腾讯为何在与阿里百度的收购比赛中当看客?
中国首台比特币ATM登陆上海 可购买不可兑换现钞
推荐阅读
更多>
银河证券王锦炎:金融业如何使用大数据
历史惊人相似:如今的库克 曾经的鲍尔默
运营商补贴减少 国内通信业拐点逼近
逆转猜想:如果阿里成为雅虎大股东会怎样?
谁说黑莓没救?他们在悄悄地深耕企业级市场,在这个领域,苹果三星算什么,他们远远不是黑莓的对手
据消息传百度将要控股携程 整合去哪儿
前苹果顾问批判iPhone命名:不应加S
小米打响手机价格战 为米3铺路或另有所图
联想架构调整后:Think品牌或推智能手机
互联网金融一周年:余额宝最接地气,比特币最作死
安全服务机构:公布2014年度最糟糕的25个密码
京东很忙:升服务推产品更新招股书 能赶在阿里前上市?
App Store严禁推送广告 运用面临大清洗
微软为避免代理权争夺 与大股东达成和解协议
虚拟运营商温度有多高?降温OR升温内外有别
马云的SNS之梦有了新目标 收购“微博”
苹果20年以来首次发债 融资170亿美元
三问刘强东:京东为何近来火气这么大?
特斯拉将获上海免费牌照 充电桩面临双重标准
SAP高层调整:联席CEO孟鼎铭成唯一掌舵人