css+svg实现炫酷天气预报盒子卡片效果代码
代码语言:html
所属分类:布局界面
代码描述:css+svg实现炫酷天气预报盒子卡片效果代码,鼠标悬浮显示一周天气。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Hind+Vadodara:300,400,500,600,700'> <style> @charset "UTF-8"; * { position: relative; font-family: "Hind Vadodara", sans-serif, "微軟正黑體"; } html, body { width: 100%; height: 100%; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; background: #222; } label { cursor: pointer; } .daybox { width: 50%; max-width: 400px; background: #f3f3f3; box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.7); border-radius: 12px; cursor: pointer; } .daybox:hover .bottom { height: 100px; } .daybox:hover .bottom .weekday { opacity: 1; top: 0px; } .textarea { color: #f3f3f3; } .snow { width: 4px; height: 4px; border-radius: 100%; background: #f3f3f3; position: absolute; left: 42px; bottom: 10px; animation: raindrop 2.5s infinite linear; } .snow2 { left: 30px; bottom: 15px; animation-delay: -1.2s; } .snow3 { left: 75px; bottom: 11px; animation-delay: -0.4s; } .snow4 { left: 60px; bottom: 14px; animation-delay: -0.2s; animation: raindrop 3.5s linear infinite; } @keyframes raindrop { 0% { transform: translateY(0px); } 100% { transform: translateX(-10px) translateY(50px); opacity: 0; } } @keyframes daylight { 0% { background-position: 100% 30%; } 50% { background-position: 100% 100%; } 100% { background-position: 100% 30%; } } .top { background: linear-gradient(20deg, #19283D, #1D678F); background-size: 100% 300%; height: 330px; animation: daylight 30s infinite; border-radius: 10px 10px 0px 0px; } .top .cloud { width: 100px; height: 36px; position: absolute; border-radius: 20px; background: #f3f3f3; left: 220px; bottom: 60px; animation: clouddrift 4s infinite linear; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0