Posts

Showing posts from January, 2016

Canvas 基本句法实例

Image
绘制一个矩形 context.fillRect(x,y,width,height); 参考系数:

3D background named starry night

Image
That's it .My starry background of website.It can move according to the scale of browser,looks like 3D effectiveness. I make the stars to 3 layers using ps6, storing them as three .png files. First layer named pg1.png, which is the stars with black background.Second layer named pg2.png, which is just stars for transparent background. And third layer named pg3.png, the same as layer second. body is for first layer.midground div is for second layer. foreground div is for third layer. Here is the code: html css  it doesn't work on IE6 and below browsers .

What I learned about velocity.js

Image
I haven't know much about javascript,especially the plugins such things.Today I learn it according to a simple project. When to use it? Velocity's built-in solutions instead of rolling your own (or relying on jQuery): looping, reversing, delaying, hiding/showing elements, property math (+, -, *, /), and hardware acceleration can all be done within Velocity.   It seems like universal functions with animations, which is efficient when coding dynamic website and app on phones. Also , I heard the other javascript called move.js ,which is the same ,but not that wide ranges attractions. Here I focus on velocity.js .More information  http://julian.com/research/velocity/ Velocity.js also works when jQuery is not loaded on your page. Using Velocity without jQuery removes support for IE8, making IE9 the new minimum supported version of IE. $element. velocity ({     width:  "500px" ,     property: value }, {      /* Velocity's default options */     duration: