css3挂历翻页效果
2021-07-13 05:05
标签:transform pac tle 时间 idt seconds for otto ott 翻页效果显示当前时间 css css3挂历翻页效果 标签:transform pac tle 时间 idt seconds for otto ott 原文地址:http://www.cnblogs.com/rlann/p/7079889.htmlDOCTYPE html>
html>
head>
meta charset="UTF-8">
title>Documenttitle>
link rel="stylesheet" type="text/css" href="css/test.css" />
script type="text/javascript" src="js/jquery.min.js">
script>
script type="text/javascript" src="js/common.js">
script>
head>
body>
div id="wrapbox">
div id="my3dspace-h">
div id="pagegroup-h">
div class="page" id="pageh1">readydiv>
div class="page" id="pageh2">godiv>
div>
div>
div id="my3dspace-m">
div id="pagegroup-m">
div class="page" id="pagem1">readydiv>
div class="page" id="pagem2">godiv>
div>
div>
div id="my3dspace">
div id="pagegroup">
div class="page" id="page1">readydiv>
div class="page" id="page2">godiv>
div>
div>
div>
script>
var curIndex = 1;
//向后翻页
function next() {
var curPage = document.getElementById(‘page‘ + curIndex);
curPage.style.webkitTransform = "rotateX(-90deg)";
curIndex++;
var nextPage = document.getElementById(‘page‘ + curIndex);
nextPage.style.webkitTransform = "rotateX(0deg)";
}
//翻页分
var curIndexm = 1;
function nextm() {
var curPagem = document.getElementById(‘pagem‘ + curIndexm);
// console.log(curPagem)
curPagem.style.webkitTransform = "rotateX(-90deg)";
curIndexm++;
var nextPagem = document.getElementById(‘pagem‘ + curIndexm);
nextPagem.style.webkitTransform = "rotateX(0deg)";
}
//翻页小时
var curIndexh = 1;
function nexth() {
var curPageh = document.getElementById(‘pageh‘ + curIndexh);
curPageh.style.webkitTransform = "rotateX(-90deg)";
curIndexh++;
var nextPageh = document.getElementById(‘pageh‘ + curIndexh);
nextPageh.style.webkitTransform = "rotateX(0deg)";
}
script>
script type="text/javascript">
$(function() {
var num = 3;
var numm = 3;
var numh = 3;
var s;
var m;
var h;
// 设置时间
setInterval(function() {
var myDate = new Date();
s = myDate.getSeconds();
m = myDate.getMinutes();
h = myDate.getHours();
}, 1000);
//生成页面
clearInterval();
var timer = setInterval(function() {
var newDiv = ‘
#wrapbox {
width: 100%;
padding-left: 0.4rem;
}
#wrapbox div {
display: inline-block;
float: left;
margin: 0.2rem;
}
/*hours*/
#my3dspace-h {
-webkit-perspective: 400;
-webkit-perspective-origin: 50% 50%;
overflow: hidden;
}
#pagegroup-h {
width: 200px;
height: 200px;
/*margin: 0 auto;*/
-webkit-transform-style: preserve-3d;
position: relative;
}
/*minutes*/
#my3dspace-m {
-webkit-perspective: 400;
-webkit-perspective-origin: 50% 50%;
overflow: hidden;
}
#pagegroup-m {
width: 200px;
height: 200px;
/*margin: 0 auto;*/
-webkit-transform-style: preserve-3d;
position: relative;
}
/*seconds*/
#my3dspace {
-webkit-perspective: 400;
/*-webkit-perspective-origin: 50% 50%;*/
overflow: hidden;
}
#pagegroup {
width: 200px;
height: 200px;
margin: 0 auto;
-webkit-transform-style: preserve-3d;
position: relative;
}
.page {
width: 200px;
height: 200px;
/*padding: 10px;*/
background-color: #0070CD;
color: #fff;
font-size: 100px;
font-weight: bold;
line-height: 200px;
text-align: center;
position: absolute;
-webkit-transform-origin: bottom;
-webkit-transition: -webkit-transform 1s linear;
-webkit-transform: rotateX(90deg);
}
#page1 {
-webkit-transform-origin: bottom;
-webkit-transition: -webkit-transform 1s linear;
}
上一篇:HTTP服务搭建
下一篇:如何防止网站因改版导致权重下降?