纯css绘制卡通人物形象
代码语言:html
所属分类:布局界面
代码描述:纯css绘制卡通人物形象
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> body { background: rgb(133, 190, 234); width: 100vw; height: 100vh; } .container { position: absolute; top: 20%; left: 25%; width: 500px; height: 700px; } .head { position: absolute; height: 45%; width: 100%; } .hat { position: absolute; height: 50%; width: 80%; background: rgb(69, 167, 91); background: linear-gradient( 190deg, rgba(69, 167, 91, 1) 31%, rgba(18, 109, 39, 1) 70%, rgba(7, 77, 0, 1) 88% ); border-radius: 70% 80% 5% 70%; top: -17%; left: 17%; transform: rotate(-45deg); z-index: -10; } #shade { position: absolute; height: 90%; width: 70%; right: 15%; top: 13%; border-radius: 0% 0% 40% 50%; z-index: 3; background: rgb(241, 135, 99, 0.3); background: linear-gradient( 120deg, rgba(241, 135, 99, 0) 55%, rgba(241, 135, 99, 1) 76% ); } .face { position: absolute; height: 100%; width: 70%; left: 10%; top: 5%; border-radius: 0% 0% 40% 50%; background: rgb(241, 135, 99); background: linear-gradient( 155deg, rgba(241, 135, 99, 1) 18%, rgba(255, 242, 178, 1) 35%, rgba(250, 205, 151, 1) 61%, rgba(241, 135, 99, 1) 86% ); z-index: 2; box-shadow: 40px -8px rgb(241, 135, 99); } .face::before { content: ""; position: absolute; background: rgb(241, 135, 99, 0.3); background: linear-gradient( -30deg, rgba(241, 135, 99, 0) 20%, rgba(241, 135, 99, 0.7) 90% ); transform: rotate(0deg); width: 7%; height: 7%; left: 33%; top: 65%; border-radius: 10% 30% 50% 50%; } .eyes { position: absolute; height: 25%; width: 12%; left: 15%; top: 35%; border-radius: 50%; background: rgb(255, 255, 255); background: linear-gradien.........完整代码请登录后点击上方下载按钮下载查看
网友评论0