div+css实现天气预报手表ui效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现天气预报手表ui效果代码

代码标签: div css 天气 预报 手表 ui

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,700' rel='stylesheet' type='text/css'/>
  
  
  
<style>
@-webkit-keyframes bg-slide {
    0% {background-position-x: left;}
    40% {background-position-x: right;}
    50% {background-position-x: right;}
    90% {background-position-x: left;}
}

html, body {
    position: relative;
    margin: 0;
    height: 100%;
    background: linear-gradient(to bottom, #999, #ddd);
    font-family: 'Roboto', sans-serif;
    z-index: 1;
}

#controls {
    padding: 10px;
    text-align: center;
}
#controls button {
    margin: 5px;
    border: 0;
    padding: 5px 0;
    width: 55px;
    cursor: pointer;
    color: #666;
    background: #eee;
}
#controls button:focus {
    outline: 0;
}

#watch {
    position: absolute;
    top:50%; left:50%;
    height:200px; width:200px;
    margin-top:-100px; margin-left:-112px;
    border-radius: 50%;
    background: #222;
    border: 10px solid #333;
    color: white;
    text-align: center;
}
#watch:before {
    content: '';
    position: absolute;
    top:50%; left:50%;
    width:110px; height:300px;
    margin-top:-150px; margin-left:-55px;
    background: #222;
    border-radius: 10px;
    z-index: -1;
}
#watch:after {
    content: '';
    position: absolute;
    top:50%; left:100%;
    height:28px; width:22px;
    margin-top:-14px;
    background: #222;
    border-radius: 4px;
    z-index: -1;
}

#screen {
    position: absolute;
    top:0; right:0; bottom:0; left:0;
    border-radius: 50%;
    overflow: hidden;
}
#screen.sunny {
    background: url('//repo.bfw.wiki/bfwrepo/image/637acb06be52e.png');
    background-size: cover;
    box-shadow: inset 0 0 0 18px rgba(1,127,204,.5);
    animation: bg-slide 20s cubic-bezier(.3,1,.3,1) infinite;
    -webkit-animation: bg-slide 20s cubic-bezier(.3,1,.3,1) infinite;
}
#screen.rainy {
    background: url('//repo.bfw.wiki/bfwrepo/image/637acab5b5b94.png');
    background-size: cover;
    box-shadow: inset 0 0 0 18px rgba(103,122,139,.5);
}
#screen.stormy {
    background: rgb(110,93,138)  url('//repo.bfw.wiki/bfwrepo/image/637aca64ce907.png') center;
    background-size: 380px 280px;
    bac.........完整代码请登录后点击上方下载按钮下载查看

网友评论0