国产麻豆一区二区精彩视频-国产麻豆一区精品视频-国产麻豆一区在线-国产毛a片久久久久无码-国产毛片av一区二区三区网站-国产毛片精品av一区二区

網頁中CSS3簡單的空調

2016/8/23 9:01:50   閱讀:1696    發布者:1696

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
*{margin:0; padding:0;}
.main{width:400px; height:340px; margin-top:150px; margin-left:150px;}
.main .container{width:300px; height:150px; position:relative; perspective:150px;}
.main .container .box{width:100%; height:100%; position:absolute; transform-style:preserve-3d;}
.main .container .box figure{display:block; position:absolute;}
.main .container .box .front{width:300px; height:150px; background-color:rgba(255, 160, 122, .7);}
.main .container .box .front h1{width:50px; height:20px; line-height:20px; text-align:center; font-size:14px; color:#FFF; margin-left:20px; margin-top:20px;}
.main .container .box .front span{width:60px; height:30px; line-height:35px; font-size:20px; color:#FFF; text-align:center; position:absolute; top:40px; right:30px; background-color:rgba(95, 95, 95, 1); display:inline-block; border-radius:5px;}
.main .container .box .front .light-1{width:6px; height:6px; border-radius:6px; background-color:#ceccc8; position:absolute; top:85px; right:40px; display:inline-block;}
.main .container .box .front .light-2{width:6px; height:6px; border-radius:6px; background-color:#ceccc8; position:absolute; top:85px; right:60px; display:inline-block;}
.main .container .box .front .light-2.active{background-color:#56FA0A; box-shadow:0 0 10px 1px #FFF;}
.main .container .box .back{width:300px; height:150px; transform:translateZ(-20px); background-color:rgba(50, 50, 50, 1);}
.main .container .box .right{width:20px; height:150px; left:290px; transform:translateZ(-10px) rotateY(90deg); background-color:rgba(254, 205, 82, .8);}
.main .container .box .left{width:20px; height:150px; left:-10px; transform:translateZ(-10px) rotateY(-90deg); background-color:rgba(254, 205, 82, .8);}
.main .container .box .top{width:300px; height:20px; top:-10px; transform:translateZ(-10px) rotateX(90deg); background-color:rgba(18, 20, 80, .8);}
.main .container .box .bottom{width:300px; height:20px; top:140px; transform:translateZ(-10px) rotateX(-90deg); background-color:rgba(18, 20, 80, .8); box-shadow:40px -10px 30px 4px gray;}
.main .container .box .div-1{width:260px; height:10px; position:absolute; top:110px; left:20px; background-color:rgba(255, 255, 255, .8); transform:translateZ(-5px) rotateX(90deg);}
.main .container .box .div-1:nth-of-type(2){top:120px;}
.animate-cycle{animation:cycle 12s linear infinite both;}
@keyframes cycle{
0% {transform:translateZ(-5px) rotateX(90deg);}
25% {transform:translateZ(-5px) rotateX(20deg);}
50% {transform:translateZ(-5px) rotateX(90deg);}
75% {transform:translateZ(-5px) rotateX(160deg);}
100% {transform:translateZ(-5px) rotateX(90deg);}
}
.main .box-1{width:80px; height:150px; border:1px solid #F57E0F; margin-top:20px; margin-left:20px; background-color:#19e6f8;}
.main .box-1 span{width:50px; height:25px; background-color:#F57E0F; color:#FFF; display:block; line-height:25px; text-align:center; margin-top:10px; margin-left:15px; font-size:14px; cursor:pointer;}
.main .box-1 span:hover{background-color:#fcd05a;}
</style>
</head>
<body>
<div class="main">
<div class="container">
<div class="box">
<figure class="front">
<h1>GREE</h1>
<span id="num">18 ºC</span>
<div class="light-1"></div>
<div class="light-2" id="light"></div>
</figure>
<figure class="back"></figure>
<figure class="right"></figure>
<figure class="left"></figure>
<figure class="top"></figure>
<figure class="bottom"></figure>
<div class="div-1" id="div_1"></div>
<div class="div-1" id="div_2"></div>
</div><!--box-->
</div><!--container-->
<div class="box-1">
<span id="openOrClose">開/關</span>
<span id="add">+</span>
<span id="reduce">-</span>
<span id="wind">風向</span>
</div><!--box-1-->
</div><!--main-->
<script>
window.onload = function(){

var getIdObject = function(id){
return document.getElementById(id);
}
var openOrClose = getIdObject(’openOrClose’),
add = getIdObject(’add’),
reduce = getIdObject(’reduce’),
wind = getIdObject(’wind’),
num = getIdObject(’num’),
light = getIdObject(’light’),
div_1 = getIdObject(’div_1’),
div_2 = getIdObject(’div_2’),
windStatus = 0,
status = 0;
openOrClose.onclick = function(){
if(!status){
status = 1;
light.className = ’light-2 active’;
}else{
status = 0;
light.className = ’light-2’;
windStatus = 0;
div_1.className = ’div-1’;
div_2.className = ’div-1’;
}
}
add.onclick = function(){
var numVal = parseInt(num.innerHTML);
if(!status || numVal >= 32){
return;
}else{
num.innerHTML = ++numVal + ’ ºC’;
}
}
reduce.onclick = function(){
var numVal = parseInt(num.innerHTML);
if(!status || numVal <= 16){
return;
}else{
num.innerHTML = --numVal + ’ ºC’;
}
}
wind.onclick = function(){
if(!status) return;
if(!windStatus){
windStatus = 1;
div_1.className = ’div-1 animate-cycle’;
div_2.className = ’div-1 animate-cycle’;
}else{
windStatus = 0;
div_1.className = ’div-1’;
div_2.className = ’div-1’;
}
}

}
</script>
</body>
</html>

主站蜘蛛池模板: 日韩欧美高清dvd碟片 | 午夜宅男在线视频 | 国产免费久久精品国产传媒 | 国产精品成人av片免费看 | 申奥演员| 国产精品后入内射日本在线观看 | 欧美精品久久久久久久影视 | 欧美高清在线播放 | 亚洲欧美日韩国产成人精品影院 | 女人被黑人狂躁c到高潮小说 | 国内精品久久久久久久97牛牛 | 亚洲丁香五月激情综合 | 日日躁夜夜躁狠狠久久av | 超碰巨乳97总站中文字幕 | 国产人妻鲁鲁一区二区 | 91网站入口 | 欧洲亚洲一区二区三区 | 天天综合天天综合色在线 | 狠狠人妻久久久久久综合蜜桃 | 色屁屁www影院入口免费观看 | 久草在线网址 | 天天干夜夜爽天天操夜夜爽视频 | 免费自拍偷拍 | 亚洲精品午夜国产va久久成人 | 少妇无码一区二区三区 | 色翁荡熄又大又硬又粗又视频 | 小明成人永久免费观看视频 | 老太脱裤子让老头玩xxxxx | 亚洲热色| 久久青青草原热精品 | 国产97色在线 | 日韩 | 亚洲国产精品久久久久久无码 | 国产三级做爰在线观看视频 | 欧美毛片性视频区 | 亚洲欧洲日产国码av系列天堂 | 欧美日韩中文一区 | 色黄网站aaaaaa级毛片 | 人妻在卧室被老板疯狂进入国产 | 久久特级毛片 | 午夜视频在线观看网站 | 日韩在线一区二区三区视频 |