css布局绘制皮卡丘和吼吼鯨卡通人物效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局绘制皮卡丘和吼吼鯨卡通人物效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { margin: 0; padding: 0; } body { background: #fffce0; height: 100vh; width: 100vw; display: flex; justify-content: center; align-items: center; flex-direction: column; } /* head */ .pikachu-top { position: relative; background: radial-gradient(circle, rgba(249,237,124,1) 59%, rgba(247,230,75,1) 99%); height: 20vmin; width: 27vmin; border-radius: 47% 53% 51% 49% / 70% 70% 40% 40%; display: flex; margin-top: 10vmin; } /* left ear */ .pikachu-top::after { content: ''; position: absolute; background: #f9ed7c; height: 12vmin; width: 7vmin; border-radius: 40% 80% 20% 20%; transform: rotate(-25deg); top: -6vmin; } .pikachu-top::before { content: ''; position: absolute; background: #f9ed7c; height: 13vmin; width: 7vmin; border-radius: 80% 40% 20% 20%; left: 21vmin; top: -3vmin; transform: rotate(60deg); } .pikachu-eyes { position: relative; background: #444444; height: 4.5vmin; width: 4.5vmin; border-radius: 50%; box-shadow: 12vmin 0 #444444; top: 9vmin; left: 5.3vmin; } .pikachu-eyes::after { content: ''; position: absolute; background: white; height: 1vmin; width: 1vmin; border-radius: 50%; left: 2.5vmin; top: 1vmin; box-shadow: 10.3vmin 0 white; } .........完整代码请登录后点击上方下载按钮下载查看
网友评论0