注册 登录 充值会员 退出
毕业设计 PHP源码
充值

简单的时钟插件analogClock.js

作者/代码整理:  (转载请附加本文地址,带有“懒人原生”字样的谢绝转载) 发布日期:2017-05-25
简单的时钟插件analogClock.js
这是一款不需要额外的css文件,不基于canvas,简单实用的网页时钟插件analogClock.js,有4种风格。


js代码

<script src="js/analogClock.js"></script>
<script>
	AnalogClock("clock1");//simple use
	AnalogClock("clock2", { width: 300, bgColor: "#bf0" });//simple option
	AnalogClock("clock3", new AnalogClockOption(200, "#eee", "#333"));//using option class to customize

	//base on object use, returns an clock object, can do some further style controll by the returned object.
	var opt = new AnalogClockOption(); opt.width = 100;
	var clock = new AnalogClock("clock4", opt);
	clock.panel.style.border = "solid 1px red";
</script>