css实现太空看日出效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现太空看日出效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> .quiet-2 { position: absolute; top: 0; left: 0; width: 100vw; height: 100vh; overflow: hidden; background: #123; } @property --x { syntax: '<percentage>'; inherits: true; initial-value: 50%; } @keyframes flyUFO { 0% { --x: -200%; } 100% { --x: 200%; } } .quiet-2::before { --x: 50%; animation: flyUFO 5s linear infinite; content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; background: /* ufo */ radial-gradient(10vw 4vw at 50% calc(100% - 75.5vw), #ccc 20%, #0000 0) var(--x) 0 / 50% 50% no-repeat, radial-gradient(10vw 4vw at 50% calc(100% - 75vw), #888 30%, #0000 0) var(--x) 0 / 50% 50% no-repeat, /* sun rising */ radial-gradient(circle at 50% calc(100% - 20vw), #ffef 1vw, #fccc, #fc89, #f855, #f851, #fff0 45vw) 50% 100%, /* stars */ radial-gradient(circle, #fff5 0.125vmin, #fff0 0) 17% 17% / 31% 31%, radial-gradient(circle, #fff8 0.15vmin, #fff0 0) 11% 21% / 21% 41%, radial-gradient(circle, #fff4 0.125vmin, #fff0 0) 15% 11% / 41% 33%, radial-gradient(circle, #fff3 0.2vmin, #fff0 0) 50% 50% / 37% 25%, radial-gradient(circle, #fff7 0.125vmin, #fff0 0) 57% 13% / 34% 23%, radial-gradient(circle, #ffc5 0.125vmin, #fff0 0) 77% -17% / 23% 27%, /* dark areas */ radial-gradient(at 0 0, #123, #1230 50%), radial-gr.........完整代码请登录后点击上方下载按钮下载查看
网友评论0