单个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=Reem+Kufi&display=swap'); *, ::before, ::after{ margin: 0; padding: 0; box-sizing: border-box; } :root{ --bg: #111; --font: #ddd; --head: #eee; --bottom: silver; } body{ background: var(--bg); height: 100vh; font-size: 3.5vmin; overflow: hidden; } .drawing-container{ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); height: 80vmin; width: 80vmin; display: grid; place-content: center; font-family: 'Reem Kufi', sans-serif; font-size: 3.5vmin; color: var(--font); text-align: center; line-height: 90vmin; background: /* face */ radial-gradient(circle at 50% 0%, #0000 35%, rgb(239, 211, 52) 0 45%, #0000 0) 36.25vmin 45vmin / 7.5vmin 7.5vmin, radial-gradient(ellipse 80% 100% at 34vmin 42vmin, rgb(239, 211, 52) 1.5vmin, #0000 0), radial-gradient(ellipse 80% 100% at 46vmin 42vmin, rgb(239, 211, 52) 1.5vmin, #0000 0), /* bulb */ radial-gradient(circle at 40vmin 30vmin, var(--head) 17.5vmin, #0000 0), conic-gradient(from 330deg at 50% 175%, var(--head) 60deg, #0000 0) 25vmin 39vmin / 30vmin 15vmin, /* light */ radial-gradient(circle at 40vmi.........完整代码请登录后点击上方下载按钮下载查看
网友评论0