css+jquery实现天气猫切换效果代码
代码语言:html
所属分类:其他
代码描述:css+jquery实现天气猫切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background-color: #469CCE; transition: background-color 1s linear; -webkit-transition: background-color 1s linear; -moz-transition: background-color 1s linear; -o-transition: background-color 1s linear; } .center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); } .circle { position: relative; margin: 0 auto; margin-bottom: 20px; width: 23%; min-width: 250px; min-height: 250px; border-radius: 50%; background-color: inherit; border: 8px solid white; overflow: hidden; } .circle:after { display: block; content: ""; padding-bottom: 100%; } /* THE CAT */ .cat { position: absolute; bottom: -20px; left: 20%; height: 55%; width: 60%; background-color: #E78336; border-bottom-style: solid; border-bottom-color: #E78336; transition: background-color 1s linear, border-bottom-color 1s linear; -webkit-transition: background-color 1s linear, border-bottom-color 1s linear; -moz-transition: background-color 1s linear, border-bottom-color 1s linear; -o-transition: background-color 1s linear, border-bottom-color 1s linear; animation: bouncy-cat 2s ease-in-out infinite; -webkit-animation: bouncy-cat 2s ease-in-out infinite; -moz-animation: bouncy-cat 2s ease-in-out infinite; -o-animation: bouncy-cat 2s ease-in-out infinite; } .cat:before, .cat:after { position: absolute; content: ""; bottom: 100%; border-bottom-style: solid; border-bottom-width: 25px; border-bottom-color: inherit; } .cat:before { border-left: 0px solid transparent; border-right: 35px solid transparent; } .cat:after { border-left: 35px solid transparent; border-right: 0px solid transparent; right: 0; } @keyframes bouncy-cat { 0% { bottom: -20px; } 50% { bottom: -30px; } 100% { bottom: -20px; } } /* CAT'S EYES */ .left-eye, .right-eye { position: absolute; top: 15%; width: 30%; height: auto; padding-top: 30%; border-radius: 50%; background-color: white; overflow: hidden; } .left-eye { left: 10%; } .right-eye { right: 10%; } .pupil { position: absolute; bottom: 10%; left: 10%; width: 80%; height: auto; padding-top: 80%; border-radius: 50%; background-color: black; } .light { position: absolute; top: 0; right: 0; width: 60%; height: auto; padding-top: 60%; border-radius: 50%; background-color: white; } .eyelid { position: absolute; left: -20%; bottom: 120%; width: 140%; height: 140%; background-color: #E78336; transition: background-color 1s linear; -webkit-transition: background-color 1s linear; -moz-transition: background-color 1s linear; -o-transition: background-color 1s linear; transition: bottom 0.5s linear; -webkit-transition: bottom 0.5s linear; -moz-transition: bottom 0.5s linear; -o-transition: bottom 0.5s linear; } /* CAT'S MOUTH */ .mouth { position: absolute; top: 50%; left: 42.5%; width: 15%; height: 13%; border-radius: 0 0 90% 90%; background-color: #F1A9A0; overflow: hidden; transition: border-radius 0.25s linear; -webkit-transition: border-radius 0.25s linear; -moz-transition: border-radius 0.25s linear; -o-transition: border-radius 0.25s linear; transition-delay: 0.25s; -webkit-transition-delay: 0.25s; -moz-transition-delay: 0.25s; -o-transition-delay: 0.25s; } .mouth:before, .mouth:after { position: absolute; display: block; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0