一.三角学原理.

function getRadio(d){//根据角度获得弧度,
                return d*Math.PI/180;
                },

function getDdegree(r){//根据弧度获得角度
                return r*180/Math.PI;
   二.循环动画方法的浏览器判断             }

if(!window.requestAnimationFrame){
    window.requestAnimationFrame=(window.webkitRequestAnimationFrame||
                                window.mozRequestAnimationFrame||
                                window.oRequestAnimationFrame||
                                window.msRequestionFrame||
                                function(callback){return window.setTimeout(callback,100/60);}
                                );
    }

三.获得元素坐标

var captureMouse=function(element){
    var mouse={x:0,y:0};
    element.addEventListener('mousemove',function(event){
        var x,y;
        if(event.pageX||event.pageY){
            x=event.pageX;y=event.pageY;
            }
        else{
            x=event.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;
            y=event.clientY+document.body.scrollTop+document.documentElement.scrollTop;
            }
        x-=element.offsetLeft;
        y-=element.offsetTop;
        
        mouse.x=x;
        mouse.y=y;
        },false);
        return mouse;
    };

四.//将十六进制的色值转换成rgb格式
var colorToRGB=function(color,alpha){
    if(typeof color==="string"&&color[0]==="#")
        color=window.parseInt(color.slice(1),16);
    alpha=(alpha===underfined)?1:alpha;
    
    var r=color>>16&0xff,
        g=color>>8&0xff,
        b=color&0xff,
        a=(alpha<0)?0:((alpha>1)?1:alpha);
        
    if(a===1)
        return "rgb("+r+","+g+","+b+")";
    else
         return "rgba("+r+","+g+","+b+","+a+")";        
    };

五//可以将一个颜色的数据值转换成十六进制,也可以将十六进制转换成数据    
var parseColor=function(color,toNumber){
    if(toNumber===true){
        if(typeof color==='number')
            return (color|0);
        if(typeof color==='string'&&color[0]==='#')
            color=color.slice(1);
        return window.parseInt(color,16);
        }
    else{
        if(typeof color==='number')
            color='#'+('00000'+(color|0).toString(16)).substr(-6);
        return color;
        }
    };

六.绘制箭头

(1)

function Arrow(){
this.x=0;
this.y=0;
this.color="#ffff00";
this.rotation=0;
}
Arrow.prototype.draw=function(context){
context.save();
context.translate(this.x,this.y);
context.rotate(this.rotation);
context.lineWidth=2;
context.fillStyle=this.color;
context.beginPath();
context.moveTo(-50,-25);
context.lineTo(0,-25);
context.lineTo(0,-50);
context.lineTo(50,0);
context.lineTo(0,50);
context.lineTo(0,25);
context.lineTo(-50,25);
context.lineTo(-50,-25);
context.closePath();
context.fill();
context.stroke();
context.restore();
};

绘制圆球

function Ball(radius,color){
if(radius===undefined){ radius=40;}
if(color==undefined){ color="#ff0000";}
this.x=0;this.y=0;
this.radius=radius;
this.rotation=0;
this.vx=0;//在边界和摩擦力上添加
this.vy=0;//在边界和摩擦力上添加
this.scaleX=1;
this.scaleY=1;
this.color=parseColor(color);
this.lineWidth=1;
}
Ball.prototype.draw=function(context){
context.save();
context.translate(this.x,this.y);
context.rotate(this.rotation);
context.scale(this.scaleX,this.scaleY);
context.lineWidth=this.lineWidth;
context.fillStyle=this.color;
context.beginPath();
context.arc(0,0,this.radius,0,(Math.PI*2),true);
context.closePath();
context.fill();
if(this.lineWidth>0){
context.stroke();
}
context.restore();
};

七.绘制各种基本动画

(1)window.onload=function(){

//平滑的上下运动
    /*var canvas=document.getElementById("canvas"),
    context=canvas.getContext('2d'),
    mouse=captureMouse(canvas);
    arrow=new Arrow();
    arrow.x=canvas.width/2;
    arrow.y=canvas.height/2;*/
    /*(function drawFrame(){
    window.requestAnimationFrame(drawFrame,canvas);
    context.clearRect(0,0,canvas.width,canvas.height);
    var dx=mouse.x-arrow.x;
    var dy=mouse.x-arrow.y;
    arrow.rotation=Math.atan(dy,dx);
    arrow.draw(context);
    }())*/

}

(2)window.onload=function(){

//线性垂直运动
    /*var canvas=document.getElementById("canvas"),
    context=canvas.getContext('2d'),
    ball=new Ball(),
    angle=0;
    var centerY=200;
    var range=50;
    var speed=0.05;
    
    ball.x=canvas.width/2;
    ball.y=canvas.height/2;
    
    (function drawFram(){
        window.requestAnimationFrame(drawFram,'canvas');
        context.clearRect(0,0,canvas.width,canvas.height);
        ball.y=centerY/2+Math.sin(angle)*50;
        angle+=speed;
        ball.draw(context);
        }());
    */

}

(3)window.onload=function(){

//脉冲运动
    /*var canvas=document.getElementById("canvas"),
    context=canvas.getContext('2d'),
    ball=new Ball(),
    angle=0,
    centerY=200,
    range=50,
    xspeed=1,
    yspeed=0.05;
    ball.x=0;
    (function drawFrame(){
        window.requestAnimationFrame(drawFrame,canvas);
        context.clearRect(0,0,canvas.width,canvas.height);
        ball.x+=xspeed;
        ball.y=centerY/2+Math.sin(angle)*range;
        ball.draw(context);
        }());*/
    /*var canvas=document.getElementById("canvas"),
    context=canvas.getContext('2d'),
    ball=new Ball(),
    angle=0,
    centerScale=1,
    range=0.5,
    speed=0.05;
    ball.x=canvas.widt/2;
    ball.y=canvas.height/2;
    (function drawFrame(){
        window.requestAnimationFrame(drawFrame,context);
        context.clearRect(0,0,canvas.width,canvas.height);
        ball.scaleX=ball.scaleY=centerScale+Math.sin(angle)*range;
        angle+=speed;
        ball.draw(context);
        }());*/

}

(4)window.onload=function(){

//使用两鞥波个角
        /*var canvas=document.getElementById("canvas"),
        context=canvas.getContext('2d'),
        ball=new Ball(),
        angleX=0,
        angleY=0,
        range=50,
        centerX=canvas.width/2,
        centerY=canvas.height/2,
        xspeed=0.07,
        yspeed=0.11;
        (function drawFrame(){
            window.requestAnimationFrame(drawFrame,context);
            context.clearRect(0,0,canvas.width,canvas.height);
            ball.x=centerX+Math.sin(angleX)*range;
            ball.y=centerY+Math.sin(angleY)*range;
            angleX+=xspeed;
            angleY+=yspeed;
            ball.draw(context);
            }());*/

}

(5)window.onload=function(){//圆周运动

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d');
angle=0,range=50,
centerY=canvas.height/2,
xspeed=1,yspeed=0.05,
xpos=0,ypos=centerY;    
context.lineWidth=2;
(function drawFrame(){
    window.requestAnimationFrame(drawFrame,canvas);
    context.beginPath();
    context.moveTo(xpos,ypos);
    xpos+=xspeed;angle+=yspeed;
    ypos=centerY+Math.sin(angle)*range;
    context.lineTo(xpos,ypos);
    context.stroke();
    }());

}

(6) window.onload=function(){//椭圆运动

var canvas=document.getElementById("canvas"),
    context=canvas.getContext('2d');
    ball=new Ball(),
    angle=0,
    centerX=canvas.width/2,
    centerY=canvas.height/2,
    radius=50,
    speed=0.05;
    
    (function drawFrame(){
        window.requestAnimationFrame(drawFrame,canvas);
        context.clearRect(0,0,canvas.width,canvas.height);
        ball.x=centerX+Math.sin(angle)*radius;
        ball.y=centerY+Math.cos(angle)*radius;
        angle+=speed;
        ball.draw(context);
        }());}

(7)勾股定律中 连个随机出现的点的距离算法1

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d');
log=document.getElementById('log');

var rect1={x:Math.random()*canvas.width,y:Math.random()*canvas.height};

context.fillStyle="#000000";
context.fillRect(rect1.x-2,rect1.y-2,4,4);

var rect2={x:Math.random()*canvas.width,y:Math.random()*canvas.height};

context.fillStyle="#ff0000";
context.fillRect(rect2.x-2,rect2.y-2,4,4);
var dx=rect1.x-rect2.x,
dy=rect1.y-rect2.y,
dist=Math.sqrt(dx*dx+dy*dy);
log.value="distance:"+dist;

(8)勾股定律 中 两个随机出现的点的距离算法2
var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas),
log=document.getElementById('log');
var a=canvas.height/2;
rect={x:canvas.width/2,y:a};
(function drawFrame(){
    window.requestAnimationFrame(drawFrame,canvas);
    context.clearRect(0,0,canvas.width,canvas.height);
    
    var dx=rect.x-mouse.x,
     dy=rect.y-mouse.y,
    dist=Math.sqrt(dx*dx-dy*dy);
    
    context.fillStyle="#000000";
    context.fillRect(rect.x-2,rect.y-2,4,4);
    
    context.beginPath();
    context.moveTo(rect.x,rect.y);
    context.lineTo(mouse.x,mouse.y);
    context.closePath();
    context.stroke();
    
    log.value="distance:"+dist;
    }());
八,方法介绍

//strokeStyle该属性用于指定线条的颜色.该值是一个颜色值(css风格的字符串),一个渐变对象或一个模式对象,线条默认颜色黑色(#000000)
//lineWidth:指定线条在路径上的宽度,默认为1,此时会在路径的两侧分别延半个像素,
//lineCap:线条的终点将如何绘制,它可以是平的,圆形活着,一段延伸线.该属性包含butt,round,square,默认是butt
//lineJoin:决定两条相连的线段如何结合,或者连接线的弯头部分如何绘制.round,bevel,miter.默认miter.
//miterLimit:当lineJoin属性设置问miter时,该属性可用于控制两条相交线外侧交点与内侧交点的距离,它必须是大于0的有限数,默认为10.
//context.save()
和context.restore()实现不同样式的转换,context.save()方法将canvas的当时状态存入栈中,包含各种样式,例
如:strokeStyle,fillStyle以及应用于canvas的变换效果.额外的样式变化会影响到后续的绘制指令.调用
context.restore()可以使得当时的canvas状态出栈而使用下一个状态,也就是上一个状态.//context.beginPath()即可表示想开始绘制一条新的路径,一条路劲只不过是构成一条线的一系列坐标位置,为了将它渲染到canvas上,需要调用contxt.stroke();

九:绘制宇宙飞船

function Ship(){
this.x=0;
this.y=0;
this.width=25;
this.height=20;
this.rotation=0;
this.showFlame=false;
}
Ship.prototype.draw=function(context){
context.save();
context.translate(this.x,this.y);
context.lineWidth=1;
context.strokeStyle="#ffffff";
context.beginPath();
context.moveTo(10,0);
context.lineTo(-10,0);
context.lineTo(-5,0);
context.lineTo(-10,-10);
context.lineTo(10,0);
context.stroke(); if(this.showFlame){
context.beginPath();
context.moveTo(-7.5,-5);
context.lineTo(-15,0);
context.lineTo(-7.5,0);
context.stroke();
}
context.restore();
};

十: 使用鼠标绘制路径

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas);
function onMouseMove(){
context.lineTo(mouse.x,mouse.y);
context.stroke();
}
canvas.addEventListener('mousedown',function(){
context.beginPath();
context.moveTo(mouse.x,mouse.y);
canvas.addEventListener('mousemove',onMouseMove,false);
},false);
canvas.addEventListener('mouseup',function(){
canvas.removeEventListener('mousemove',onMouseMove,false)
},false);

十一,使用quadraticCurveTo绘制弯线,不会穿过控制点

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas),
x0=100,y0=200,x2=300,y2=200; canvas.addEventListener('mousemove',function(){
context.clearRect(0,0,canvas.width,canvas.height);
var x1=mouse.x,y1=mouse.y;
context.beginPath();
context.moveTo(x0,y0);
context.quadraticCurveTo(x1,y1,x2,y2);
context.stroke();
},false);

十二:使用quadraticCurveTo绘制弯线,穿过控制点

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas),
x0=100,y0=200,x2=300,y2=200; canvas.addEventListener('mousemove',function(){
context.clearRect(0,0,canvas.width,canvas.height);
var x1=mouse.x*2-(x0+y2)/2,y1=mouse.y*2-(x0+y2)/2;
context.beginPath();
context.moveTo(x0,y0);
context.quadraticCurveTo(x1,y1,x2,y2);
context.stroke();
},false);

十三:色值渐变色:线性渐变

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
pt1={x:0,y:0},pt2={x:100,y:100},
gradient=context.createLinearGradient(pt1.x,pt2.y,pt2.x,pt2.y);
gradient.addColorStop(0,"#ffffff");//为渐变色添加颜色
gradient.addColorStop(0.5,"#0000ff")
gradient.addColorStop(1,"#ff0000");
context.fillStyle=gradient;
context.fillRect(0,0,100,100);//绘制并填充一个矩

十四:色值渐变色:线性渐变

var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
c1={x:150,y:150,radius:0},c2={x:150,y:150,radius:50},
gradient=context.createRadialGradient(c1.x,c1.y,c1.radius,c2.x,c2.y,c2.radius);
gradient.addColorStop(0,"#ffffff");//为渐变色添加颜色
//gradient.addColorStop(0.5,"#0000ff")
gradient.addColorStop(1,"#ff0000");
context.fillStyle=gradient;
context.fillRect(0,0,100,100);//绘制并填充一个矩形

十五: 绘制图片

  var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
image=new Image(); image.src='1.jpg';
image.onload=function(){
//context.drawImage(image,0,0);//图片左上角位置0,0
//context.drawImage(image,0,0,400,400);//图片左上角位置0,0,图片尺寸400,400
context.drawImage(image,50,50,450,450,50,50,300,300);//(image,sx,sy,sw,sh,dx,dy,dw,dh),将图片裁剪到矩形内(sx,xy,sw,sh)中,并缩放至(dh,dw),在绘制到(dx,dy)坐标
};

十六:绘制canvas中的图片

 var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
image=document.getElementById("picture");//<canvas id="canvas" width="400px" height="400px" style="border:1px solid red; position:absolute; left:200px; top:50px;"><img src="1.jpg" id="picture" /></canvas>
context.drawImage(image,0,0);

十七:速度向量,双轴上的圆运动

 var canvas=document.getElementById("canvas"),
context=canvas.getContext("2d"),
ball=new Ball(),
vx=1,vy=1;
ball.x=50,ball.y=100; (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
ball.x+=vx;
ball.y+=vy;
ball.draw(context);
}());

十八:角速度

var canvas=document.getElementById("canvas"),
context=canvas.getContext("2d"),
ball=new Ball(),
angle=45,speed=1;
ball.x=50,ball.y=100; (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height); var radians=angle*Math.PI/180,
vx=Math.cos(radians)*speed,vy=Math.sin(radians)*speed;
ball.x+=vx;ball.y+=vy;
ball.draw(context);
}())

十九:鼠标追随者

 var canvas=document.getElementById("canvas"),
context=canvas.getContext("2d"),
mouse=captureMouse(canvas),
arrow=new Arrow(),
speed=3;
(function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
var dx=mouse.x-arrow.x,
dy=mouse.y-arrow.y,
angle=Math.atan2(dy,dx),
vx=Math.cos(angle)*speed,
vy=Math.sin(angle)*speed; arrow.rotation=angle;arrow.x+=vx;arrow.y+=vy;
arrow.draw(context);
}());

二十:速度向量扩展

 var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas),
arrow=new Arrow(),
vr=2;
arrow.x=canvas.width/2;
arrow.y=canvas.height/2; (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height/2);
arrow.rotation+=vr*Math.PI/180;
arrow.draw(context);
}());

二十一: 键盘的左右键控制圆的运动

 var canvas=document.getElementById("canvas"),
context=canvas.getContext("2d"),
ball=new Ball(),
vx=0,ax=0,ay=0,vy=0; ball.x=canvas.width/2;
ball.y=canvas.height/2; window.addEventListener('keydown',function(event){
if(event.keyCode==37){//左
ax=-0.1;
}
else if(event.keyCode==39){//右
ax=0.1;
}
else if(event.keyCode==38){ay=-0.1;}//上
else if(event.keyCode==40){ay=0.1;}//下
},false); window.addEventListener('keyup',function(){
ax=0;
ay=0;
},false); (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height); vx+=ax;vy+=ay;
ball.x+=vx;
ball.y+=vy;
ball.draw(context);
}());

二十二:单轴加速度

 var canvas=document.getElementById('canvas'),
context=canvas.getContext('2d'),
ball=new Ball(),
vx=0,ax=0.1;
ball.x=50;ball.y=100; (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
vx+=ax;
ball.x+=vx;
ball.draw(context);
}());
 双轴加速度
var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
ball=new Ball(),
vx=0,vy=0,ax=0,ay=0;
ball.x=canvas.width/2;
ball.y=canvas.height/2;
window.addEventListener('keydown',function(){
switch(event.keyCode){
case 37://left
ax=-0.1;
break;
case 39://right
ax=0.1;
break;
case 38:
ay=-0.1;
break;
case 40:
ay=0.1;
break;
}
},false);
window.addEventListener('keyup',function(){
ax=0; ay=0;
},false);
(function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
vx+=ax;
vy+=ay;
ball.x+=vx;
ball.y+=vy;
ball.draw(context);
}()); 重力加速度
var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
ball=new Ball(),
vx=0,vy=0,ax=0,ay=0;
ball.x=canvas.width/2;
ball.y=canvas.height/2;
var gravity=0.02; window.addEventListener('keydown',function(){
switch(event.keyCode){
case 37://left
ax=-0.1;
break;
case 39://right
ax=0.1;
break;
case 38:
ay=-0.1;
break;
case 40:
ay=0.1;
break;
}
},false);
window.addEventListener('keyup',function(){
ax=0; ay=0;
},false);
(function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height); vx+=ax;
vy+=ay;
vy+=gravity;
ball.x+=vx;
ball.y+=vy; ball.draw(context);
}()); 角加速度
var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
mouse=captureMouse(canvas),
arrow=new Arrow(),
vx=0,vy=0,force=0.05;
(function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
var dx=mouse.x-arrow.x,
dy=mouse.x-arrow.y,
angle=Math.atan2(dy,dx),
ax=Math.cos(angle)*force,
ay=Math.sin(angle)*force;
arrow.roation=angle;
vx+=ax;vy+=ay;
arrow.x+=vx;arrow.y+=vy;
arrow.draw(context);
}()); 制作飞船
var canvas=document.getElementById("canvas"),
context=canvas.getContext("2d");
var ship=new Ship(),
vr=0,vx=0,vy=0,thrust=0; ship.x=canvas.width/2;
ship.y=canvas.height/2;
window.addEventListener('keydown',function(event){
switch(event.keyCode){
case 37://left
vr=-3;
break; case 39://right
vr=3;
break; case 38://up
thrust=0.05;
ship.showFlame=true;
break;
}
},false); window.addEventListener('keyup',function(){
vr=0;
thrust=0;
ship.showFlame=false;
},false); (function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
ship.rotation+=vr*Math.PI/180;
var angle=ship.rotation,
ax=Math.cos(angle)*thrust,
ay=Math.sin(angle)*thrust;
vx+=ax;vy+=ay;
ship.x+=vx;ship.y+=vy;
ship.draw(context);
}()); 随机出现移动的小圆,移动超出边界的话,将他移除掉
var canvas=document.getElementById("canvas"),
context=canvas.getContext('2d'),
log=document.getElementById('log'),
balls=[],
numBalls=10; for(var ball,i=0;i<numBalls;i++){
ball=new Ball(20);
ball.id="ball"+i;
ball.x=Math.random()*canvas.width;
ball.y=Math.random()*canvas.height;
ball.vx=Math.random()*2-1;
ball.vy=Math.random()*2-1;
balls.push(ball);
} function draw(ball,pos){
ball.x+=ball.vx;
ball.y+=ball.vy;
if(ball.x-ball.radius>canvas.width||
ball.x+ball.radius<0||
ball.y-ball.radius>canvas.height||
ball.y+ball.radius<0){
ball.splice(pos,1);
if(balls.length>0){
log.value="Removed"+ball.id;
}
else{
log.value="All gone!";
}
}
ball.draw(context);
}
(function drawFrame(){
window.requestAnimationFrame(drawFrame,canvas);
context.clearRect(0,0,canvas.width,canvas.height);
var i=balls.length;
while(i--){
draw(balls[i],i);
} }()); })

HTML5的动画学习历程的更多相关文章

  1. html5和css3学习历程

    1.video,audio视频和音频的应用 <!doctype html><html> <head></head> <body>  < ...

  2. HTML5 Canvas画图与动画学习59例

    HTML5 Canvas画图与动画学习59例 学习HTML5 动画,画图的好资料. HTML5 Canvas画图与动画学习59例

  3. 7 个顶级的 HTML5 Canvas 动画赏析

    HTML5确实是一项改革浏览器乃至整个软件行业的新技术,它可以帮助我们Web开发者很方便地在网页上实现动画特效,而无需臃肿的Flash作为支撑.本文分享7个顶级的HTML5 Canvas 动画,都有非 ...

  4. 【转】15个无比华丽的HTML5/CSS3动画应用

    原文转自:http://www.html5cn.org/article-7089-1.html 前几天,HTML5标准已经尘埃落定,未来的Web将会是由HTML5主导,当然作为开发者对这一喜讯更为动心 ...

  5. HTMl5/CSS3/Javascript 学习推荐资源

    HTMl5/CSS3/Javascript 学习推荐资源 前端的定义应该是数据内容的展示,在国内大家都觉得前端只是HTML+CSS+Javascript,但是实际上与展示有关的都是前端,所以Ruby/ ...

  6. HTML5课程大纲/学习路线

    HTML5课程大纲/学习路线 这是什么? 这个一个HTML技术路线的课程大纲/学习大纲. 你能用它做什么? 如果你是找工作的人, 利用本大纲, 你可以学习HTML5语言, 做一个HTML前端工程师, ...

  7. 超给力的HTML5 3D动画欣赏及源码下载

    HTML5有着非常巨大的魅力,尤其是CSS3和Cavnas,可以帮助页面渲染得非常炫酷.值得一提的是,利用HTML5的3D特性可以帮助你更加方便地在网页上实现3D动画特效.本文分享的这些HTML5 3 ...

  8. 16个富有创意的HTML5 Canvas动画特效集合

    HTML5技术正在不断的发展和更新,越来越多的开发者也正在加入HTML5阵营,甚至在移动开发上HTML5的地位也是越来越重要了.HTML5中的大部分动画都是通过Canvas实现,因为Canvas就像一 ...

  9. 7款让人惊叹的HTML5粒子动画特效

    HTML5的很大一个优势就是可以更加便捷高效地制作网页粒子动画特效,特别是Canvas特性,可以实现在网页上绘制任何图形和动画.本文要分享7款让人惊叹的HTML5粒子动画特效,这些粒子特效都提供源代码 ...

随机推荐

  1. linux概念之内存分析

    linux内存总结 分析样本[root@-comecs ~]# free total used free shared buffers cached Mem: -/+ buffers/cache: S ...

  2. jQuery.retryAjax

    Overload method for $.ajax that provides the ability to try the request over if it fails the first t ...

  3. CSS3之Flexbox布局

    CSS3为我们提供了一种可伸缩的灵活的web页面布局方式-flexbox布局,它具有很强大的功能,可以很轻松实现很多复杂布局,在它出现之前,我们经常使用的布局方式是浮动或者固定宽度+百分比来进行布局, ...

  4. html简介

    什么是 HTML? HTML 是用来描述网页的一种语言. HTML 指的是超文本标记语言 (Hyper Text Markup Language) HTML 不是一种编程语言,而是一种标记语言 (ma ...

  5. 创建UIImage的两种方法

    1. UIImage *img = [UIImage imageNamed:@"imageName"]; 2. NSString *imageFilePath = [[NSBund ...

  6. 【转】linux-系统启动流程详解

    第二十章.启动流程.模块管理与 Loader 最近升级日期:2009/09/14 1. Linux 的启动流程分析 1.1 启动流程一览 1.2 BIOS, boot loader 与 kernel ...

  7. IntelliJ IDEA常用快捷键

    双击shift 项目所有目录查找 ctrl+f 文件查找特定内容 ctrl+shift+f 项目查找包含特定内容的文件 ctrl+n 新建类 ctrl+shift+n 查找文件 ctrl+e  最近的 ...

  8. Saltstack系列2:Saltstack远程执行命令

    命令 命令格式: salt '<操作目标>' <方法>[参数] 例: salt 'wx' cmd.run 'free -m' #查看被控主机内存使用情况 常用参数 针对< ...

  9. 装过photoshop后出现configuration error

    1.你用的应该是精简版的PS,找到ps启动图标,点击右键,以管理员身份运行试试. 2.可以右键你的快捷方式,选择兼容性,后面有个选框“以管理员身份运行”,应用,下次就不报错了.

  10. android学习笔记一——简介

    android 是由Andy Rubin创立的一个手机操作系统,后被google收购. google希望同各方共同建立一个标准化.开放式的移动电话软件平台,从而在移动产业内形成了一个开放式的操作平台. ...