- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
html时钟
!DOCTYPE HTML
html
head
meta charset=UTF-8
meta content=yes name=apple-mobile-web-app-capable
meta content=black name=apple-mobile-web-app-status-bar-style
meta content=telephone=no name=format-detection
meta name=viewport content=width=device-width,initial-scale=1 /
meta name=format-detection content=telephone=no /
meta name=viewport content=width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0 / !--禁止缩放--
style type=text/css
#box{
width: 300px;
position: relative;
margin: 50px auto;
height: 300px;
}
canvas{
position:absolute;
top:0px;
left:0px;
}
#imgdiv{
position: absolute;
width: 100px;
height: 100px;
border-radius:50px;
top:50%;
left: 50%;
margin-left: -50px;
margin-top: -50px;
position: absolute;
overflow: hidden;
}
#imgdiv img{
display: block;
width: 100%;
min-height: 100%;
}
/style
title时钟/title
/head
body
div id=box
canvas id=canvas width=300 height=300/canvas
canvas class=process width=300 height=3000%/canvas
canvas id=p_canvas width=300 height=300/canvas
div id=imgdivimg src=mm1.jpg //div
/div
script type=text/javascript src=jquery-1.8.3.min.js/script
script type=text/javascript
//获取绘图对象
var canvas = document.getElementById(canvas);
var context = canvas.getContext(2d);
var p_canvas = document.getElementById(p_canvas);
var p_context = p_canvas.getContext(2d);
var height=300,width=300;
//画空心大圆
context.beginPath();
context.strokeStyle=#e0e0e0;
context.arc(width/2,height/2,width/2-1,0,Math.PI*2,true);
context.stroke();
context.closePath();
//话实心灰色圆
context.beginPath();
context.arc(width/2,height/2,width/2.2-1,0,360,false);
context.fillStyle=#e0e0e0;//填充颜色,默认是黑色
context.fill();//画实心圆
context.closePath();
//画中间点
context.beginPath();
context.fillStyle=#000;
context.arc(width/2,height/2,3,0,Math.PI*2,true);
context.fill();
context.closePath();
//画小刻度
您可能关注的文档
最近下载
- Chinese Farming Civilization智慧树知到期末考试答案章节答案2024年东北农业大学.docx VIP
- 高等数学教案(最全).doc VIP
- 非煤露天矿边坡工程技术规范下载.pdf VIP
- 【河南理工大学毕业设计】基于Matlab的光伏发电并网系统设计.pdf VIP
- 规范编制高速公路隧道专项施工方案.pdf VIP
- 悬挑式脚手架监理实施细则.doc VIP
- 亲子非暴力沟通指南——人际关系.pptx VIP
- 新)第二章 微机保护的软件原理.ppt VIP
- 综合医疗机构肺结核防治工作质量评价规范(T_CHATA 042-2024) (1).pdf VIP
- GB/T 43079.1-2023钢制管法兰、垫片及紧固件选用规定 第1部分:PN系列.pdf
文档评论(0)