css绘制四个猫咪效果代码
代码语言:html
所属分类:布局界面
代码描述:css绘制四个猫咪效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background-color: #a4c7ca; } .container { position: absolute; width: 600px; height: 500px; left: 50%; top: 50%; transform: translate(-50%, -50%); } /* background */ .window { position: absolute; height: 350px; width: 500px; border: 20px solid whitesmoke; border-radius: 3px; z-index: -10; box-shadow: 5px 5px 5px grey; background: rgb(167, 225, 247); overflow: hidden; left: 50%; top: 50%; transform: translate(-50%, -50%); } .sun { position: absolute; height: 80px; width: 80px; border-radius: 50%; background-image: radial-gradient(gold, #f8e88d); box-shadow: 0px 20px 80px #fcdf05; z-index: 30; top: 18px; left: 25px; } .cloud { position: absolute; margin-top: 70px; width: 150px; height: 50px; background-color: white; border-radius: 100px; left: -180px; animation: cloud 60s linear; } .cloud::after, .cloud::before { content: ""; position: relative; display: inline-block; background: inherit; border-radius: inherit; } .cloud::after { width: 80px; height: 80px; top: -140px; left: 20px; } .cloud::before { width: 100px; height: 100px; top: -40px; left: 40px; } .grass { position: absolute; height: 100px; width: 650px; background-color: #80a071; bottom: 0px; } .catscontainer { display: flex; position: absolute; right: 40px; bottom: 190px; grid-gap: 20px; } .table { position: absolute; height: 30px; width: 620px; right: -58px; bottom: -160px; border-radius: 40px; background-image: linear-gradient(180deg, #956842 10%, #61421c); box-shadow: 0px 10px 60px rgb(52, 47, 47); } /* bubble */ .bubble { position: absolute; background: #fcd999; color: #050505; font-family: Parisienne; font-size: 30px; line-height: 60px; box-shadow: 3px 2px 8px 0px #363636b5; text-align: center; width: 130px; height: 59px; border-radius: 10px; padding: 0px; top: -120px; } .bubble:after { content: ""; position: absolute; display: block; width: 0; z-index: 1; border-style: solid; border-width: 33px 43px 0 0; border-color: #fcd999 transparent transparent transparent; bottom: -33px; left: 24%; margin-left: -21.5px; } /*.........完整代码请登录后点击上方下载按钮下载查看
网友评论0