<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS3时钟式进度条</title>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<style type="text/css">
#cricle{width:200px;height:200px;position:relative;background:#333;overflow:hidden}
#cricle .left,#cricle .right,#cricle .text{width:200px;height:200px}
#cricle .text{position:absolute;top:0;left:0;z-index:41;color:#fff;font:26px/200px 'arial';text-align:center}
#cricle .mask{z-index:40}
#cricle .mask,#cricle .bg{width:100px;height:200px;background:#333;position:absolute;top:0}
#cricle .bg{background:url(/jscss/demoimg/201207/bg_green.png) no-repeat 0 0}
#cricle .mask,#cricle .left .bg{left:0}
#cricle .right{display:none}
#cricle .right .bg{background-position:right top;right:0}
</style>
<script src="/ajaxjs/jquery1.3.2.js"></script>
</head>
<body>
<div id="cricle">
<div class="mask"></div>
<div class="left">
<div class="bg"></div>
</div>
<div class="right">
<div class="bg"></div>
</div>
<div class="text"></div>
</div>
<script type="text/javascript">
var C = function(id){
this.box = $("#"+id);
this.left = this.box.find(".left");
this.right = this.box.find(".right");
this.mask = this.box.find(".mask");
this.text = this.box.find(".text");
this.d = 0;
this.A = null;
this.init();
}
C.prototype = {
init : function(){
var T = this;
this.A = window.setInterval(function(){T.change()},80);
},
change : function(){
var T = this;
if(this.d>180){
if(this.d>360){
window.clearInterval(this.A);
this.A = null;
return;
}
this.right.show();
this.mask.hide();
}
this.text.text(parseInt(this.d/3.6));
this.left.css({
"-webkit-transform":"rotate("+this.d+"deg)",
"-moz-transform":"rotate("+this.d+"deg)"
})
this.d += 6;
}
}
new C("cricle");
</script>
</body>
</html>

原文链接:http://www.codefans.net/jscss/code/3573.shtml

CSS3 圆形时钟式网页进度条的更多相关文章

  1. ProgressBar.js – 漂亮的响应式 SVG 进度条

    ProgressBar.js 是一个借助动态 SVG 路径的漂亮的,响应式的进度条效果.使用 ProgressBar.js 可以很容易地创建任意形状的进度条.这个 JavaScript 库提供线条,圆 ...

  2. 用css2属性clip实现网页进度条

    前言 看了网上一些关于网页进度条样式的资料,有很多方式实现,针对其展现形式,有用图片的,有用css2属性clip,有用flash的,本人就学会了一种,下面就简单来介绍一下. css2的属性clip 如 ...

  3. HTML5+CSS3的响应式网页设计:自动适应屏幕宽度

    这几天都在修改博客上面的样式.本来用的是d83.0的模板.自己又修改了许多地方,其中自己修改的一些地方在手机里面显示的效果不是很理想,于是想改成自适应的效果.对CSS3不是特别的熟练,只能去网上找找案 ...

  4. HTML5-svg圆形饼状图进度条实现原理

    <svg width="440" height="440" viewbox="0 0 440 440"> <circle ...

  5. Javascript 及 CSS3 实现进度条效果

    Javascript 及 CSS3 实现进度条效果 一:css2 属性clip实现网页进度条:  在实现之前,我们先来介绍一下clip属性,因为这个属性在css2.1中很少使用到,所以我们有必要来了解 ...

  6. 自定义控件之圆形颜色渐变进度条--SweepGradient

    前几天在群里面有人找圆形可颜色渐变进度条,其中主要的知识点是SweepGradient: mSweepGradient = new SweepGradient(240, 360, new int[] ...

  7. css3实现不同进度条

    进度条类型1(渐变进度条) 效果1:图片实现进度条 思路,进度条是一张图片,用定位来控制不同时间图片相对进度条box的left值来控制位置,用animate实现动画效果 html <div cl ...

  8. HTML5圆形百分比进度条插件circleChart

    在页面中引入jquery和circleChart.min.js文件. <script src="path/to/jquery.min.js"></script&g ...

  9. 超酷jQuery进度条加载动画集合

    在丰富多彩的网页世界中,进度条加载动画的形式非常多样,有利用gif图片实现的loading动画,也有利用jQuery和CSS3实现的进度加载动画,本文主要向大家介绍很多jQuery和CSS3实现的进度 ...

随机推荐

  1. IREP_SOA Integration WSDL概述(概念)

    20150827 Created By BaoXinjian

  2. UVA 253 Cube painting(暴力打表)

    Cube painting Problem Description: We have a machine for painting cubes. It is supplied with three d ...

  3. 树莓派安装3.5inch RPi LCD (A)显示屏

    3.5inch RPi LCD (A) 资料 产品介绍 用户手册 开发资料 开发软件 树莓派镜像 演示视频 FAQ 在自定义Raspbian系统镜像上怎么使用树莓派LCD? 先确保自定义镜像可正常进入 ...

  4. DataTable中的数据赋值给model z

    create table memberinfo ( member_id int, member_name varchar(20), member_birthday varchar(50) ) go / ...

  5. mysql 实现oracle start with connect by递归

    在Oracle 中我们知道有一个 Hierarchical Queries 通过CONNECT BY 我们可以方便的查了所有当前节点下的所有子节点.但很遗憾,在MySQL的目前版本中还没有对应的功能. ...

  6. [ActionScript 3.0] 根据xml属性查找相应xml节点,递归函数。

    import flash.net.URLLoader; import flash.net.URLRequest; import flash.events.Event; var xml:XML; var ...

  7. 去掉 input type="number" 右边图标

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  8. ubuntu 服务管理

    在Linux系统下,一个Services的启动.停止以及重启通常是通过/etc/init.d目录下的脚本来控制的.然而,在启动或改变运行级别时,是在/etc/rcX.d中来搜索脚本.其中X是运行级别的 ...

  9. Android 基础控件 TextView

    一TextView介绍: TextView是UI最基本的组件,使用TextView可以显示丰富的文本信息.设置添加TextView最常见的方法就是在xml中添加TextView元素,并指定属性.Tex ...

  10. android界面布局技巧(一)

    (1)//得到手机的宽高 Display display = getWindowManager().getDefaultDisplay(); int screenWidth = display.get ...