一个div实现南瓜表情效果
代码语言:html
所属分类:布局界面
代码描述:一个div实现南瓜表情效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { -webkit-box-align: center; align-items: center; background-blend-mode: color-burn; background-color: rebeccapurple; background-image: radial-gradient(closest-side at50% 60%, deeppink 0, midnightblue 100%); display: -webkit-box; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; flex-direction: column; height: 100vh; -webkit-box-pack: center; justify-content: center; position: relative; width: 100vw; z-index: 1; } .Pumpkin { background-image: radial-gradient(circle at 50% 20%, orange 0, orangered 100%); border-radius: 47%; box-shadow: 0.25rem 0 0 -0.125rem orangered, 1.5rem 0 0 -0.125rem darkorange, 1.625rem 0 0 -0.125rem orangered, 2.5rem 0 0 -0.375rem darkorange, 2.625rem 0 0 -0.375rem maroon, -0.25rem 0 0 -0.125rem orangered, -1.5rem 0 0 -0.125rem darkorange, -1.625rem 0 0 -0.125rem orangered, -2.5rem 0 0 -0.375rem darkorange, -2.625rem 0 0 -0.375rem maroon, 0 -0.125rem 0.5rem 0 rgba(0, 0, 0, 0.2), 0 1rem 4rem 2rem rgba(0, 0, 0, 0.5), 4rem -1rem 7rem #ffb900, -4rem -1rem 7rem #ffb900; display: block; height: 7.5rem; position: relative; width: 6rem; } .Pumpkin::before { box-sizing: border-box; content: ""; display: block; border-bottom: 1.5rem solid transparent; border-left: 1rem solid green; border-radius: 50%; border-right: 0.25rem solid transparent; border-top: 0.5rem solid green; box-shadow: inset 2px 4px 0 rgba(0, 0, 0, 0.2); height: 3rem; left: 40%; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0