纯css布局实现孤月色效果
代码语言:html
所属分类:布局界面
代码描述:纯css布局实现孤月色效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; } .midnight { position: relative; background: linear-gradient( 0deg, rgba(20, 32, 72, 1) 3%, rgba(20, 32, 72, 1) 4%, rgba(77, 90, 130, 1) 33%, rgba(50, 71, 125, 1) 76% ); width: 300px; height: 400px; margin: 0 auto; margin-top : 100px; } .midnight-sky { position: absolute; background: linear-gradient( 180deg, rgba(44, 1, 108, 1) 8%, rgba(69, 26, 116, 1) 35%, rgba(110, 75, 131, 1) 79%, rgba(137, 106, 140, 1) 92% ); width: 300px; height: 200px; margin: 0 auto; } .midnight-moon { position: absolute; background: white; width: 90px; height: 90px; margin: 0 auto; left: 100px; top: 40px; border-radius: 50%; box-shadow: 0px 0px 14px 10px #735699; } .midnight-moon-circle { border-radius: 50%; background: #dfdfdf; position: absolute; box-shadow: inset 2px 1px 0px #c0c0c0; } .midnight-moon-circle1 { top: 25px; left: 10px; width: 20px; height: 20px; } .midnight-moon-circle2 { top: 40px; right: 10px; width: 30px; height: 30px; } .midnight-moon-circle3 { top: 30px; right: 10px; width: 10px; height: 10px; } .midnight-moon-circle4 { top: 8px; left: 44px; width: 8px; height: 8px; } .midnight-right-mountain { position: absolute; background: #221c53; width: 40px; height: 100px; right: 0; clip-path: polygon(100% 0, 0 100%, 100% 100%); top: 100px; } .midnight-middle-mountain { position: absolute; background: #343399; width: 200px; height: 125px; right: 20px; clip-path: polygon(50% 0%, 0% 100%, 100% 100%); z-index: 9; top: 75px; } .midnight-middle-mountain::before { content: ''; background: #221c53; width: 100px; height: 125px; display: block; } .midnight-middle-mountain::after { clip-path: polygon(100% 51%, 42% 39%, 88% 100%, 0 100%, 0 0); top: 0; content: ''; background: #221c53; width: 50px; height: 125px; display: block; position: absolute; right: 53px; } .midnight-left-mountain { position: absolute; background: #343399; w.........完整代码请登录后点击上方下载按钮下载查看
网友评论0