利用JS实现酷炫红色LED数字时钟代码

利用JS实现酷炫红色LED数字时钟代码

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css">
<link rel="stylesheet" type="text/css" href="css/style.css">

2. 引入JS

<script src="js/digital-clock.js" type="text/javascript"></script>

3. HTML代码

<div class="clock">
	<div class="digit hours">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
	<div class="digit hours">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
	<div class="separator"></div>
	<div class="digit minutes">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
	<div class="digit minutes">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
	<div class="separator"></div>
	<div class="digit seconds">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
	<div class="digit seconds">
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
		<div class="segment"></div>
	</div>
</div>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>

用户评论

18素材网

一个让开发更高效的素材分享平台,用于快速开发强大的Web界面。


官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:864918708
Css3+Html5讨论群
群号:864918708

加群请备注:从官网了解到