<html>
<head>
<title>Canvas</title>
<script>
window.onload = function(){
var elem = document.createElement("canvas");
elem.width = 500;
elem.height = 500;
document.body.appendChild( elem );
var context = elem.getContext("2d");
context.fillRect(0, 0, elem.width, elem.height);
var pos = 0, dir = 1;
setInterval(function(){
context.rotate( 15 );
context.fillStyle = "rgba(0,0,0,0.05)";
context.fillRect(0, 0, elem.width, elem.height);
context.fillStyle = "rgba(255, 0, 0, 1)";
context.fillRect(pos, pos, 20, 20);
pos += dir;
if ( pos > elem.width ) {
dir = -1;
} else if ( pos + 20 < 0 ) {
dir = 1;
}
}, 10);
};
</script>
</head>
<body></body>
</html>
分享到:
相关推荐
lucene-demos-3.0.2.jar 搜索引擎
wxPython2.8-win32-docs-demos-2.8.12.1 wxPython2.8-win32-docs-demos-2.8.12.1 wxPython2.8-win32-docs-demos-2.8.12.1 wxPython2.8-win32-docs-demos-2.8.12.1 wxPython2.8-win32-docs-demos-2.8.12.1 wxPython...
包含OpenCV-2.4.0-GPU-demos-pack-win32.exe,OpenCV-2.4.0-GPU-demos-pack-win64.exe
wxPython的文档和例子程序 win32-docs-demos-2.8.8.1
rf-demos-masterrf-demos-masterrf-demos-masterrf-demos-masterrf-demos-master
This document will help explain some of the major changes in wxPython 2.6 since the 2.4 series and let you know what you need to do to adapt your programs to those changes. Be sure to also check in ...
lucene-demos-2.0.0.jar lucene-demos-2.0.0.jar lucene-demos-2.0.0.jar
QT5 Canvas 实现tunneler plasmatree particles FlowerPower等特效
入门新手学习 react的demo ,简单易懂,直接本地运行。一键运行。 ,简单易懂,直接本地运行。一键运行。
This file includes two exe file for wxpython which are file for installation and documents for reference. IT'S REQUIRED thatPYTHON IS INSTALLED IN your computer.
该资源为springcloud-k8s,是spring-cloud项目在k8s上部署的示例代码,用于快速构建spring-cloud项目并发布在k8s集群,为从事k8s技术开发和运维提供共享代码
最新版的全文搜索框架lucene的jar包,官方下载地址http://repo1.maven.org/maven2/org/apache/lucene/。
lucene-demos-2.3.2.jar
lucene-demos-2.4.0.jar
IPFS-and-Ethereum-Projects-Important-News-Demos-and-More精品报告
js-framework-demos-源码.rar
product-demos-源码.rar
lucene jar包,lucene,lucene-core-3.0.2.jar;lucene-demos-3.0.2.jar
IPFS-and-Ethereum-Projects-Important-News-Demos-and-More精品报告2020.pdf
Android-ApiDemos-1,可以看Api实例,对安卓开发很有帮助