<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>css3时钟</title>

<style>

.box{

width: 300px;

height: 300px;

border-radius: 50%;

border: 5px solid #ccc;

margin: 100px auto;

position: relative;

}

.kedu{

width: 300px;

height: 300px;

border-radius: 50%;

position: relative;

overflow: hidden;

}

.kedu div{

height: 300px;

position: absolute;

left: 50%;

}

.kedu div:nth-child(1){

width: 6px;

background: #333;

margin-left: -3px;

}

.kedu div:nth-child(2){

width: 2px;

background: #666;

margin-left: -3px;

transform: rotate(30deg);

}

.kedu div:nth-child(3){

width: 2px;

background: #666;

margin-left: -3px;

transform: rotate(60deg);

}

.kedu div:nth-child(4){

width: 6px;

background: #333;

margin-left: -3px;

transform: rotate(90deg);

}

.kedu div:nth-child(5){

width: 2px;

background: #666;

margin-left: -3px;

transform: rotate(120deg);

}

.kedu div:nth-child(6){

width: 2px;

background: #666;

margin-left: -3px;

transform: rotate(150deg);

}

.disc{

width: 20px;

height: 20px;

border-radius: 50%;

background: #000;

position: absolute;

top: 50%;

left: 50%;

margin-left: -10px;

margin-top: -10px;

z-index: 2;

}

.middisc{

width: 260px;

height: 260px;

border-radius: 50%;

background: #fff;

position: absolute;

top: 50%;

left: 50%;

margin-left: -130px;

margin-top: -130px;

}

.hour{

width: 6px;

height: 60px;

background: #000;

position: absolute;

top: -50px;

left: 50%;

margin-left: -3px;

transform-origin: bottom center;

animation: move 43200s steps(60) 0s infinite;

}

.minu{

width: 4px;

height: 80px;

background: green;

position: absolute;

top: -70px;

left: 50%;

margin-left: -2px;

transform-origin: bottom center;

animation: move 3600s steps(60) 0s infinite;

}

.second{

width: 2px;

height: 100px;

background: #f00;

position: absolute;

top: -90px;

left: 50%;

margin-left: -1px;

transform-origin: bottom center;

-webkit-animation: move 60s steps(60) infinite;

}

.cover{

width: 20px;

height: 20px;

border-radius: 50%;

background: #000;

position: absolute;

}

@keyframes move{

0%{

transform: rotate(0deg);

}

100%{

transform: rotate(360deg);

}

}

</style>

</head>

<body>

<div class="box">

<div class="kedu">

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

<div></div>

</div>

<div class="disc">

<div class="hour"></div>

<div class="minu"></div>

<div class="second"></div>

<div class="cover"></div>

</div>

<div class="middisc">

</div>

</div>

</body>

</html>

有大量web前端开发工具及学习资料,可以搜群【 web前端学习部落22群 】进行下载,遇到学习问题也可以问群内专家以及课程老师哟

CSS3简易表盘时钟的更多相关文章

  1. 使用jQuery和CSS3制作数字时钟(jQuery篇) 附源码下载

    HTML 和上一篇文章:使用jQuery和CSS3制作数字时钟(CSS3篇)一样的HTML结构,只是多了个>date用来展示日期和星期的. <div id="clock" ...

  2. iOS 绘制一个表盘时钟,秒针效果可以“扫秒/游走”

    最近自己 也尝试写了一个表盘时钟,初衷源于等车时候一个老奶奶问时间,我打开手机,时间数字对我来说相对敏感,但是老奶奶是看不清的,我想识别 还是看表盘 老远 看时针分针角度就可以识别当前时间. 于是我想 ...

  3. 网页计算器 && 简易网页时钟 && 倒计时时钟

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

  4. css3 简易时钟

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  5. html+css3实现网页时钟

    在网页上实现时钟功能,效果如右图所示: 运用到的关键技术有:css3中的旋转.旋转基点设置 旋转:transform:rotate(*deg) 旋转基点:transform-origin: x轴偏移 ...

  6. canvas绘制表盘时钟

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  7. QT绘制简易表盘

    1.简介 最近学习了一下QT,熟悉了一段时间后发现它的功能还是挺强大的,同时也比较方便用户上手去使用.现在就基于最近学习的内容,实现一个简易的带指针旋转功能的表盘.文中表盘的实现是基于QT的QPain ...

  8. css3简易实现图标动画由小到大逐个显现

    在制作网站时避免图片太平淡经常会用到动画效果:由小到大跳跃出现.这种效果很有视觉冲击力,显著提高关注度~ 原理:利用css3的动画属性@keyframes@-moz-keyframes@-webkit ...

  9. 基于FPGA的简易数字时钟

    基于FPGA的可显示数字时钟,设计思路为自底向上,包含三个子模块:时钟模块,进制转换模块.led显示模块.所用到的FPGA晶振频率为50Mhz,首先利用它得到1hz的时钟然后然后得到时钟模块.把时钟模 ...

随机推荐

  1. css-列表或标题的多级计数

    利用css实现多级计数,比如1/1.1/1.1.1这种层层嵌套的计数,主要利用到counter-reset/counter-increment/counter/content/:before. 一.标 ...

  2. ui library

    https://github.com/twbs/bootstrap https://github.com/semantic-org/semantic-ui/ https://github.com/zu ...

  3. R for循环之break,next

    next跳出本次循环 break跳出本层循环(当有多个for 循环时,即跳出最近的一个for循环)

  4. Django基础,Day5 - form表单投票详解

    投票URL polls/urls.py: # ex: /polls/5/vote/ url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, ...

  5. Oracle 删除重复数据只留一条

    查询及删除重复记录的SQL语句   1.查找表中多余的重复记录,重复记录是根据单个字段(Id)来判断   select * from 表 where Id in (select Id from 表 g ...

  6. JS提交对象数组到服务端的方法总结(C#实例)

    *转载请注明出处: 作者:willingtolove: 本文链接:http://www.cnblogs.com/willingtolove/p/4741549.html 正文: 1. 方法一:利用aj ...

  7. 5种 JavaScript 调用函数的方法

    一次又一次的,我发现,那些有bug的Javascript代码是由于没有真正理解Javascript函数是如何工作而导致的(顺便说一下,许多那样的代码是我写的).JavaScript拥有函数式编程的特性 ...

  8. Genymotion安装及遇到的问题

    https://www.genymotion.com/ 首先注册,不注册看不到下载按钮. 注册登陆后下载安装包(一定要记住用户名和密码,因为安装后登陆要用) 一路下一步. 选择虚拟设备 genymot ...

  9. windows命令

    开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选&qu ...

  10. MySQL索引类型总结和使用技巧以及注意事项

    索引是快速搜索的关键.MySQL索引的建立对于MySQL的高效运行是很重要的.下面介绍几种常见的MySQL索引类型 在数据库表中,对字段建立索引可以大大提高查询速度.假如我们创建了一个 mytable ...