vues实现人物脸型自定义参数效果代码
代码语言:html
所属分类:其他
代码描述:vues实现人物脸型自定义参数效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Noto+Sans+TC:700|Titillium+Web:700,900'> <style> html, body { margin: 0; display: flex; align-items: center; background-color: #3b00ff; flex-direction: column; font-family: "Titillium Web", "Noto Sans TC"; } .tac { text-align: center; } .editing { text-align: center; color: #fff; top: 3px; left: 8px; cursor: pointer; } h1 { color: #fff; text-align: center; margin-bottom: 5px; } .characterbox .characterType { display: flex; justify-content: center; align-items: center; padding: 50px; border-bottom: 2px solid rgba(255, 255, 255, 0.3); } .characterbox .characterType .type { flex: 1; text-align: center; font-size: 80px; color: #fff; } .characterbox .characterType .character { flex: 1; margin: 0 50px; } .characterbox .characterType .control { flex: 1; } .characterbox .characterType .face { width: 80px; height: 100px; border-radius: 30%; position: relative; display: flex; justify-content: center; } .characterbox .characterType .face.black { background-color: #774d23; } .characterbox .characterType .face.white { background-color: #ffdfbd; } .characterbox .characterType .face.yellow { background-color: #f7c691; } .characterbox .characterType .face.circle { width: 80px; height: 100px; border-radius: 80% 80% 100% 100%; } .characterbox .characterType .face.oval { width: 75px; height: 110px; border-radius: 70% 70% 90% 90%; } .characterbox .characterType .face .hair { width: 110%; height: 28%; max-width: 90px; position: absolute; top: 0; background-color: #111; border-radius: 15px 15px 5px 5px; } .characterbox .characterType .face .fiveSenses { width: 80px; height: 80px; border-radius: 20%; position: absolute; bottom: 0; display: flex; justify-content: center; } .characterbox .characterType .face .fiveSenses.black { background-color: #774d23; } .characterbox .characterType .face .fiveSenses.black:before, .characterbox .characterType .face .fiveSenses.black:after { content: ""; display: block; position: absolute; width: 15px; height: 28px; background-color: #63401d; right: calc(100% - 1px); top: 21%; border-radius: 10px 3px 0 15px; } .characterbox .characterType .face .fiveSenses.black:after { left: calc(100% - 1px); border-radius: 3px 10px 15px 0; } .characterbox .characterType .face .fiveSenses.black .nosebody { background-color: #9e672f; } .characterbox .characterType .face .fiveSenses.white { background-color: #ffdfbd; } .characterbox .characterType .face .fiveSenses.white:before, .characterbox .characterType .face .fiveSenses.white:after { content: ""; display: block; position: absolute; width: 15px; height: 28px; background-color: #ffd3a4; right: calc(100% - 1px); top: 21%; border-radius: 10px 3px 0 15px; } .characterbox .characterType .face .fiveSenses.white:after { left: calc(100% - 1px); border-radius: 3px 10px 15px 0; } .characterbox .characterType .face .fiveSenses.white .nosebody { background-color: #ffc68a; } .characterbox .characterType .face .fiveSenses.yellow { background-color: #f7c691; } .characterbox .characterType .face .fiveSenses.yellow:before, .characterbox .characterType .face .fiveSenses.yellow:after { content: ""; display: block; position: absolute; width: 15px; height: 28px; background-color: #f5ba79; right: calc(100% - 1px); top: 21%; border-radius: 10px 3px 0 15px; } .characterbox .characterType .face .fiveSenses.yellow:after { left: calc(100% - 1px); border-radius: 3px 10px 15px 0; } .characterbox .characterType .face .fiveSenses.yellow .nosebody { background-color: #f9d2a9; } .characterbox .characterType .face .fiveSenses.circle { width: 80px; height: 80px; border-radius: 60% 60% 110% 110%; } .characterbox .characterType .face .fiveSenses.oval { width: 75px; height: 90px; border-radius: 60% 60% 110% 110%; } .characterbox .characterType .face .eye { width: 75%; height: 28%; position: absolute; top: 20%; display: flex; justify-content: space-between; align-items: center; } .characterbox .characterType .face .eye .l_eye, .characterbox .characterType .face .eye .r_eye { width: 40%; height: 100%; min-height: 2px; background-color: #222; border-radius: 50%; position: relative; overflow: hidden; } .characterbox .characterType .face .eye .l_eye:before, .characterbox .characterType .face .eye .r_eye:before { content: ""; display: block; width: 20%; height: 20%; min-width: 1p.........完整代码请登录后点击上方下载按钮下载查看
网友评论0