足球游戏_中国足彩网¥体育资讯$

CSS3数字时钟
来源:易贤网 阅读:1289 次 日期:2015-09-02 15:29:14
温馨提示:易贤网小编为您整理了“CSS3数字时钟”,方便广大网友查阅!

代码如下:

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gbk">

<title>CSS3数字时钟 DEMO</title>

<style type="text/css">

body {

background:#202020;

font:bold 12px Arial, Helvetica, sans-serif;

margin:0;

padding:0;

min-width:960px;

color:#bbbbbb;

}

a {

text-decoration:none;

color:#00c6ff;

}

h1 {

font: 4em normal Arial, Helvetica, sans-serif;

padding: 20px;

margin: 0;

text-align:center;

}

h1 small {

font: 0.2em normal Arial, Helvetica, sans-serif;

text-transform:uppercase;

letter-spacing: 0.2em;

line-height: 5em;

display: block;

}

h2 {

font-weight:700;

color:#bbb;

font-size:20px;

}

h2, p {

margin-bottom:10px;

}

@font-face {

font-family: 'BebasNeueRegular';

src: url('/BebasNeue-webfont.eot');

src: url('//BebasNeue-webfont.eot') format('embedded-opentype'), url('/BebasNeue-webfont.woff') format('woff'), url('/BebasNeue-webfont.ttf') format('truetype'), url('/BebasNeue-webfont.svg') format('svg');

font-weight: normal;

font-style: normal;

}

.container {

width: 960px;

margin: 0 auto;

overflow: hidden;

}

.clock {

width:800px;

margin:0 auto;

padding:30px;

border:1px solid #333;

color:#fff;

}

#Date {

font-family:'BebasNeueRegular', Arial, Helvetica, sans-serif;

font-size:36px;

text-align:center;

text-shadow:0 0 5px #00c6ff;

}

ul {

width:800px;

margin:0 auto;

padding:0px;

list-style:none;

text-align:center;

}

ul li {

display:inline;

font-size:10em;

text-align:center;

font-family:'BebasNeueRegular', Arial, Helvetica, sans-serif;

text-shadow:0 0 5px #00c6ff;

}

#point {

position:relative;

-moz-animation:mymove 1s ease infinite;

-webkit-animation:mymove 1s ease infinite;

padding-left:10px;

padding-right:10px;

}

@-webkit-keyframes mymove {

0% {

opacity:1.0;

text-shadow:0 0 20px #00c6ff;

}

50% {

opacity:0;

text-shadow:none;

}

100% {

opacity:1.0;

text-shadow:0 0 20px #00c6ff;

}

}

@-moz-keyframes mymove {

0% {

opacity:1.0;

text-shadow:0 0 20px #00c6ff;

}

50% {

opacity:0;

text-shadow:none;

}

100% {

opacity:1.0;

text-shadow:0 0 20px #00c6ff;

}

}

</style>

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>

<script type="text/javascript">

$(document).ready(function() {

// Create two variable with the names of the months and days in an array

var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];

var dayNames= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]

// Create a newDate() object

var newDate = new Date();

// Extract the current date from Date object

newDate.setDate(newDate.getDate());

// Output the day, date, month and year

$('#Date').html(dayNames[newDate.getDay()] + " " + newDate.getDate() + ' ' + monthNames[newDate.getMonth()] + ' ' + newDate.getFullYear());

setInterval( function() {

// Create a newDate() object and extract the seconds of the current time on the visitor's

var seconds = new Date().getSeconds();

// Add a leading zero to seconds value

$("#sec").html(( seconds < 10 ? "0" : "" ) + seconds);

},1000);

setInterval( function() {

// Create a newDate() object and extract the minutes of the current time on the visitor's

var minutes = new Date().getMinutes();

// Add a leading zero to the minutes value

$("#min").html(( minutes < 10 ? "0" : "" ) + minutes);

},1000);

setInterval( function() {

// Create a newDate() object and extract the hours of the current time on the visitor's

var hours = new Date().getHours();

// Add a leading zero to the hours value

$("#hours").html(( hours < 10 ? "0" : "" ) + hours);

}, 1000);

});

</script>

</head>

<body>

<div class="clock">

<div id="Date"></div>

<ul>

<li id="hours"> </li>

<li id="point">:</li>

<li id="min"> </li>

<li id="point">:</li>

<li id="sec"> </li>

</ul>

</div>

<p>来源:<a href="http://www.zaole.net" target="_blank">CSS3html5在线测试</a> 感谢:王涛</p>

<p>中国足彩网代码请访问:<a href="http://www.update8.com/" target="_blank">站长技术教程网</a></p>

</body>

</html>

中国足彩网信息请查看IT技术专栏

中国足彩网信息请查看网页制作
易贤网手机网站地址:CSS3数字时钟
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标