div+css布局实现可爱葫芦娃福娃效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现可爱葫芦娃福娃效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html { font-size: 1vmin; } body { margin: 0; min-height: 100vh; min-height: 100svh; background: linear-gradient(#0000 calc(50% + 22.5em), #0000 0, #0003), linear-gradient(#c551 calc(50% + 22.5em), #c55 0); } article { width: 90em; aspect-ratio: 1; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: radial-gradient(40% 8% at 45% 88%, #0003, #0000), radial-gradient(50% 12% at 50% 85%, #0005, #0000); } article *, article *::before, article *::after { position: absolute; box-sizing: border-box; } .stem { width: 10%; height: 20%; background: radial-gradient(40% 10% at 70% 0%, #ffc3 99%, #0000), radial-gradient(80% 176% at 80% 80%, #fff5, #0000 60%), radial-gradient(80% 176% at 80% 90%, #0000 60%, #0008), linear-gradient(#0000 80%, #0004), #963; border-radius: 100% / 50% 120% 50% 20%; --mask: radial-gradient(80% 176% at 80% 80%, #0000 calc(45% - 1px), #000 45% 70%, #0000 calc(70% + 1px)); -webkit-mask: var(--mask); mask: var(--mask); left: 50%; top: 0; transform: translate(-50%, -90%) rotate(-5deg); } .body { --mask: radial-gradient(35% 25% at 50% 25%, #f00 calc(100% - 1px), #0000), radial-gradient(50% 35% at 50% 65%, #f00 calc(100% - 1px), #0000), linear-gradient(#0000 19%, #000 0 60%, #0000 0); --mask: radial-gradient(35% 25% at 50% 25%, #f00 calc(100% - 1px), #0000), radial-gradient(50% 35% at 50% 65%, #f00 calc(100% - 1px), #0000), radial-gradient(48% 155% at -20% -20%, #0000 calc(100% - 1px), #000) 0 33.5% / 55% 24% no-repeat, radial-gradient(48% 155% at 120% -20%, #0000 calc(100% - 1px), #000) 10.........完整代码请登录后点击上方下载按钮下载查看
网友评论0