日期:2014-05-16  浏览次数:20388 次

js高手的作品
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/javascript; charset=utf-8">
<meta name="Author" content="hongru.chenhr">
<meta name="keywords" content="站长,网页特效,js特效,js脚本,脚本,广告代码,zzjs,zzjs.net,sky,www.zzjs.net,站长特效 网" />
<meta name="description" content="www.zzjs.net,站长特效网,站长必备js特效及广告代码。全力打造一流网页特效站!" />
<title>站长特效 js高手制作的一个动画拖动效果,站长特效网</title>
<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));
&nb