<!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. Spark on Yarn年度知识整理

    大数据体系结构: Spark简介 Spark是整个BDAS的核心组件,是一个大数据分布式编程框架,不仅实现了MapReduce的算子map 函数和reduce函数及计算模型,还提供更为丰富的算子,如f ...

  2. JMS的常用方法

    import javax.jms.Connection; import javax.jms.ConnectionFactory; import javax.jms.Destination; impor ...

  3. CF 500 B. New Year Permutation 并查集

    User ainta has a permutation p1, p2, ..., pn. As the New Year is coming, he wants to make his permut ...

  4. 转--Android资源总结(环境搭建/ 反编译工具)

    在Android发展前景相当好的情况下,本人最近搜集了一些关于Android的相关资源,当然包含以前发布的博客内容,进行了一次大整合,希望对和我一样是Android的初学者管用,如在文章中有所错误,敬 ...

  5. NodeJS常用工具

    一.NodeJS版本管理器n或者nvm npm install -g n npm install n -g --registry=https://registry.npm.taobao.org --v ...

  6. C++学习11 类和new、delete操作符 类与const关键字

    如果你是Java.C#.PHP程序员,那么会对 new 非常熟悉,在这些编程语言中,只能通过 new 来创建对象. 在C++中,你可以像定义变量一样来创建对象,如: Student stu; //对象 ...

  7. 常用的 Android Studio 快捷键

    Android Studio 开发常用快捷键: 整理了使用 Android Studio 开发工具时常用到的一些快捷键,使用快捷键可以极大提高开发效率. 常用的 Android Studio 快捷键: ...

  8. [SQL]循环插入数据,并且计算插入所用时间

    --得出以上速度的方法是:在各个select语句前加: declare @d datetime set @d=getdate() select * from tb --并在select语句后加: se ...

  9. GroupId和ArtifactId

    <!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc --><dependency> ...

  10. 启用 CORS 来解决这个问题(ajax跨域请求)

    <input type="file" name="btn_Upload" value="上传" id="btn_Upload ...