纯css实现天气预报卡片效果
代码语言:html
所属分类:动画
代码描述:纯css实现天气预报卡片效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Open+Sans:700,400);
body {
margin: 0;
height: 100vh;
width: 100vw;
display: flex;
align-items: center;
justify-content: center;
font-family: "Open Sans", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
font-size: 14px;
}
.background {
position: relative;
background: linear-gradient(to bottom, #1a2238 40%, #222 100%);
border-radius: 5px;
box-shadow: 0 5px 15px 0 rgba(0, 0, 0, 0.25);
width: 400px;
height: 400px;
display: flex;
align-items: flex-end;
transition: all 0.3s ease-in-out;
overflow: hidden;
}
.moon {
position: absolute;
width: 70px;
height: 70px;
top: 45px;
left: 55px;
border-radius: 50%;
background: #f6edbd;
box-shadow: 0 0 10px 0 #f6edbd;
animation: moon 1s ease-out, glow 5s ease-in-out infinite;
overflow: hidden;
}
.moon .crater {
background-color: #ece1a8;
position: absolute;
border-radius: 50%;
}
.moon .crater-1,
.moon .crater-2,
.moon .crater-3 {
width: 12px;
height: 12px;
}
.moon .crater-4,
.moon .crater-5,
.moon .crater-6,
.moon .crater-7,
.moon .crater-8,
.moon .crater-9 {
width: 6px;
height: 6px;
}
.moon .crater-10,
.moon .crater-11 {
width: 4px;
height: 4px;
}
.moon .crater-1 {
top: 10px;
left: 30px;
}
.moon .crater-2 {
top: 10px;
left: 0;
}
.moon .crater-3 {
top: 55px;
left: 10px;
}
.moon .crater-4 {
top: 35px;
left: 50px;
}
.moon .crater-5 {
top: 25px;
left: 60px;
}
.moon .crater-6 {
top: 55px;
left: 35px;
}
.moon .crater-7 {
top: 15px;
left: 45px;
}
.moon .crater-8 {
top: 30px;
left: 25px;
}
.moon .crater-9 {
top: 40px;
left: 15px;
}
.moon .crater-10 {
top: 25px;
left: 15px;
}
.moon .crater-11 {
top: 40px;
left: 35px;
}
.hillWrapper {
position: absolute;
width: 400px;
height: 300px;
}
.hillWrapper .hill {
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0