div+css布局绘制一个卡通黑猫代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局绘制一个卡通黑猫代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Montserrat&display=swap"); :root { --light: 0; --bg: hsl(164, 45%, 66%); --cat: hsl(85.71, 8.86%, 15.49%); --ear: hsl(331.62, 36.63%, 60.39%); } @media (color-gamut: p3) { :root { --bg: color(display-p3 0.3 0.71 0.59); --cat: color(display-p3 0.11 0.12 0.11); --ear: color(display-p3 1 0.62 0.81); } } .painting { position: relative; width: 80vmin; height: 80vmin; overflow: hidden; } .painting::before, .painting::after { content: ""; display: block; position: absolute; inset-block-end: 0; inset-inline-start: 50%; width: 100%; height: 100%; } .painting::before { transform: translate(-50%, 0); background: radial-gradient(10% 10% at 50% 0%, white 99%, transparent) 79.7% 95%/23% 22%, radial-gradient(10% 10% at 50% 0%, white 99%, transparent) 89% 95%/23% 22%, radial-gradient(8% 3% at 50% 100%, var(--bg) 99%, transparent) 30.833% 20%/25% 72%, linear-gradient(90deg, transparent 30%, var(--bg) 0 53.3333%, transparent 0) 34.3333% 100%/17% 23%, radial-gradient(8% 3% at 50% 100%, var(--bg) 100%, transparent) 70% 73%/25% 72%, linear-gradient(90deg, transparent 30%, var(--bg) 0 54%, transparent 0) 69.6333% 100%/17% 8%, radial-gradient(40% 45% at 80% 100%, var(--bg) 99%, transparent) 48% 84.7%/17% 16%, linea.........完整代码请登录后点击上方下载按钮下载查看
网友评论0