小黄人生成动态大眼睛的效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>小黄人</title> <style type="text/css"> .container { width: 970px; margin: 0 auto; padding-top: 70px; padding-left: 70px; transition: ease 0.3s all; -webkit-transition: ease 0.3s all; } .bill { background: #f1cb48; background: -moz-linear-gradient(left, #f1cb48 0%, #f9d65c 24%, #f9d65c 48%, #e6bc3b 99%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#f1cb48), color-stop(24%,#f9d65c), color-stop(48%,#f9d65c), color-stop(99%,#e6bc3b)); background: -webkit-linear-gradient(left, #f1cb48 0%,#f9d65c 24%,#f9d65c 48%,#e6bc3b 99%); background: -o-linear-gradient(left, #f1cb48 0%,#f9d65c 24%,#f9d65c 48%,#e6bc3b 99%); background: -ms-linear-gradient(left, #f1cb48 0%,#f9d65c 24%,#f9d65c 48%,#e6bc3b 99%); background: linear-gradient(to right, #f1cb48 0%,#f9d65c 24%,#f9d65c 48%,#e6bc3b 99%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1cb48', endColorstr='#e6bc3b',GradientType=1 ); ; width: 140px; height: 290px; border-radius: 70px; float: left; margin-left: 30px; position: relative; transition: ease 0.3s all; -webkit-transition: ease 0.3s all; } .bill * { position: absolute; box-sizing: content-box; -moz-box-sizing: content-box; } .glasses { background-color: rgba(0, 0, 0, 0); border: #949699 solid 11px; width: 57px; height: 57px; border-radius: 50%; top: 30px; left: 31px; z-index: 99; } .eye_animate { width: 57px; height: 0px; border-radius: 31%; background-color: #F9D65C; top: 41px; left: 42px; z-index: 9; animation: eyes_animation 1.5s ease 2s infinite; -o-animation: eyes_animation 1.5s ease 2s infinite; -moz-animation: eyes_animation 1.5s ease 2s infinite; -webkit-animation: eyes_animation 1.5s ease 2s infinite; } @-moz-keyframes eyes_animation { 0% { height: 0px; } 15% { height: 57px; } 30% { height: 0px; } 100% { height: 0px; } } @keyframes eyes_animation { 0% { height: 0px; } 15% { height: 57px; } 30% { height: 0px; } 100% { height: 0px; } } .yellow_part { width: 57px; height: 57px; background-color: #F9D65C; top: 11px; left: 11px; } .white_part * { border-radius: 50% } .white_part { width: 57px; border-radius: 50%; height: 48px; background-color: #FFF; top: 44px; left: 42px; box-shadow: 0 0 16px rgba(0, 0, 0, 0.3) inset; } .brown_eye { background-color: #a87a51; width: 21px; height: 21px; top: 13px; right: 18px; } .black_part { background-color: black; width: 8px; height: 8px; top: 6px; left: 6px; } .black_part:after { background-color: #FFF; width: 3px; height: 3px; left: 1px; border-radius: 50%; position: absolute; content: ''; -webkit-filter: blur(1px); -o-filter: blur(1px); } .black_part:before { background-color: #FFF; width: 3px; height: 3px; left: 1px; border-radius: 50%; position: absolute; content: ''; -webkit-filter: blur(1px); -o-filter: blur(1px); } .black_tie { top: 61px; right: 0px; } .right_tie { -webkit-transform: rotate(2deg); -o-transform: rotate(2deg); -ms-transform: rotate(2deg); -moz-transform: rotate(2deg); transform: rotate(2deg) } .right_tie * { right: -3px; } .top_tie { background-color: #3E3E3C; width: 28px; height: 8px; right: -2px; border-top-right-radius: 6px; border-bottom-right-radius: 2px; border: 1px solid #30302E; border-top-left-radius: 3px; } .top_tie:after { background-color: #FFF; width: 5px; height: 10px; right: 25px; z-index: 9999; position: absolute; content: ''; border-radius: 36%; border: 1px solid #30302E; bottom: -1px; } .down_tie { background-color: #3E3E3C; width: 28px; height: 8px; right: -2px; top: 9px; border-top-right-radius: 2px; border-bottom-right-radius: 6px; border: 1px solid #30302E; border-top-left-radius: 2px; } .down_tie:after { background-color: #FFF; width: 5px; height: 10px; right: 25px; z-index: 9999; position: absolute; content: ''; border-radius: 36%; border: 1px solid #30302E; bottom: -2px; } .left_tie { -webkit-transform: scaleX(-1) rotate(2deg); -moz-transform: scaleX(-1) rotate(2deg); -ms-transform: scaleX(-1) rotate(2deg); -o-transform: scaleX(-1) rotate(2deg); transform: scaleX(-1) rotate(2deg); right: 116px; } .left_tie * { left: -3px; } .clothes .main { background-color: #35668F; width: 80px; height: 67px; top: 193px; left: 29px; z-index: 99999; border-left: 1px dotted #FFF; border-right: 1px dotted #FFF; } .clothes .main:before { content: ''; position: absolute; background: #f1cb48; background: -moz-linear-gradient(right, #F1CB48 -11%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -webkit-gradient(linear, right top, left top, color-stop(-11%,#F1CB48), color-stop(24%,#F9D65C), color-stop(48%,#F9D65C), color-stop(109%,#E6BC3B)); background: -webkit-linear-gradient(left, #F1CB48 -11%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -o-linear-gradient(right, #F1CB48 -11%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -ms-linear-gradient(right, #F1CB48 -11%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: linear-gradient(to right, #F1CB48 -11%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1cb48', endColorstr='#e6bc3b',GradientType=1 ); width: 110px; border-radius: 50%; height: 57px; left: -14px; top: -49px; } .clothes .main:after { content: ''; position: absolute; width: 100px; background: #35668F; background: -moz-radial-gradient(top, ellipse cover, #35668f 57%, #003e82 120%); background: -webkit-gradient(radial, top center, 0px, top center, 100%, color-stop(57%,#35668f), color-stop(120%,#003e82)); background: -webkit-radial-gradient(top, ellipse cover, #35668F 57%,#003E82 120%); background: -o-radial-gradient(top, ellipse cover, #35668f 57%,#003e82 120%); background: -ms-radial-gradient(top, ellipse cover, #35668f 57%,#003e82 120%); background: radial-gradient(ellipse at top, #35668F 57%,#003E82 120%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35668f', endColorstr='#003e82',GradientType=1 ); border-radius: 50%; height: 30px; left: -10px; top: 73px; } .right_shirt { background-color: #35668F; width: 45px; height: 10px; top: 201px; left: 96px; border: 1px dotted #DDD; -webkit-transform: rotate(-13deg); -moz-transform: rotate(-13deg); -ms-transform: rotate(-13deg); -o-transform: rotate(-13deg); transform: rotate(-13deg); border-bottom-right-radius: 9px; z-index: 99999; } .right_shirt:before { background-color: #000; height: 8px; width: 8px; left: 2px; position: absolute; content: ''; border-radius: 50%; top: 1px; } .right_shirt:after { background-color: #35668F; height: 2px; width: 2px; left: 5px; position: absolute; content: ''; border-radius: 50%; top: 4px; } .make_it_left { left: -2px; -webkit-transform: scaleX(-1) rotate(-13deg); -moz-transform: scaleX(-1) rotate(-13deg); -ms-transform: scaleX(-1) rotate(-13deg); -o-transform: scaleX(-1) rotate(-13deg); transform: scaleX(-1) rotate(-13deg); } .clothes { z-index: 9999; } .clothes .bottom { width: 142px; background: #35668F; background: -moz-radial-gradient(top, ellipse cover, #35668f 61%, #003e82 100%); background: -webkit-gradient(radial, top center, 0px, top center, 100%, color-stop(61%,#35668f), color-stop(100%,#003e82)); background: -webkit-radial-gradient(top, ellipse cover, #35668F 61%,#003E82 100%); background: -o-radial-gradient(top, ellipse cover, #35668f 61%,#003e82 100%); background: -ms-radial-gradient(top, ellipse cover, #35668f 61%,#003e82 100%); background: radial-gradient(ellipse at top, #35668F 61%,#003E82 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#35668f', endColorstr='#003e82',GradientType=1 ); filter: inherit; height: 50px; top: 240px; left: -1px; border-bottom-right-radius: 25px; border-bottom-left-radius: 26px; } .clothes .bottom:before { content: ''; position: absolute; width: 140px; border-radius: 50%; height: 34px; left: 0px; top: -19px; background: #f1cb48; background: -moz-linear-gradient(right, #F1CB48 0%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 99%); background: -webkit-gradient(linear, left top, right top, color-stop(0%,#F1CB48), color-stop(24%,#F9D65C), color-stop(48%,#F9D65C), color-stop(99%,#E6BC3B)); background: linear-gradient(to right, #F1CB48 0%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 99%); background: -o-linear-gradient(right, #F1CB48 0%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 99%); background: -ms-linear-gradient(right, #F1CB48 0%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 99%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1cb48', endColorstr='#e6bc3b',GradientType=1 ); } .smile { background-color: #000; border-radius: 50%; width: 79px; height: 37px; top: 114px; z-index: 99999; right: 31px; } .smile:before { position: absolute; content: ''; border-radius: 50%; width: 100px; height: 37px; top: -3px; right: -13px; background: #f1cb48; background: -moz-linear-gradient(right, #F1CB48 -40%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -webkit-gradient(linear, right top, left top, color-stop(-40%,#F1CB48), color-stop(24%,#F9D65C), color-stop(48%,#F9D65C), color-stop(109%,#E6BC3B)); background: -webkit-linear-gradient(left, #F1CB48 -40%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -o-linear-gradient(right, #F1CB48 -40%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: -ms-linear-gradient(right, #F1CB48 -40%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); background: linear-gradient(to right, #F1CB48 -40%,#F9D65C 24%,#F9D65C 48%,#E6BC3B 109%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1cb48', endColorstr='#e6bc3b',GradientType=1 ); } .legs { top: 285px } .right_leg { background: #003e82; background: -moz-linear-gradient(top, #003e82 0%, #35668f 40%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#003e82), color-stop(40%,#35668f)); background: -webkit-linear-gradient(top, #003e82 0%,#35668f 40%); background: -o-linear-gradient(top, #003e82 0%,#35668f 40%); background: -ms-linear-gradient(top, #003e82 0%,#35668f 40%); background: linear-gradient(to bottom, #003e82 0%,#35668f 40%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#003e82', endColorstr='#35668f',GradientType=0 ); width: 45px; height: 38px; left: 73px; border-bottom-left-radius: 4px; } .right_leg:before { position: absolute; content: ''; border-radius: 50%; width: 40px; height: 73px; left: 28px; background-color: #FFF; top: 5px; } .make_it_left_leg { left: 23px; -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1) } .shoes { background-color: #231F20; width: 45px; height: 9px; top: 36px; left: 74px; border-top-right-radius: 14px; -webkit-transform: rotate(2deg); -moz-transform: rotate(2deg); -ms-transform: rotate(2deg); -o-transform: rotate(2deg); transform: rotate(2deg); } .shoes:after { position: absolute; content: ''; border-top-right-radius: 30%; width: 30px; height: 6px; background-color: #231F20; top: 8px; right: 0px; border-bottom-right-radius: 31%; border-bottom-left-radius: 50%; -webkit-transform: rotate(2deg); -moz-transform: rotate(2deg); -ms-transform: rotate(2deg); -o-transform: rotate(2deg); transform: rotate(2deg); } .shoes:before { position: absolute; content: ''; width: 9px; height: 6px; background-color: #231F20; top: 6px; left: 0px; border-bottom-right-radius: 40%; } .small_shoes { border-radius: 40%; width: 30px; height: 10px; background-color: #231F20; top: -4px; right: 4px; -webkit-transform: rotate(9deg); -moz-transform: rotate(9deg); -ms-transform: rotate(9deg); -o-transform: rotate(9deg); transform: rotate(9deg); } .small_shoes:before { position: absolute; content: ''; width: 18px; height: 6px; background-color: #35668F; top: -1px; left: -1px; -webkit-transform: rotate(-12deg) !important; -moz-transform: rotate(-12deg) !important; -ms-transform: rotate(-12deg) !important; -o-transform: rotate(-12deg) !important; transform: rotate(-12deg) !important; border-bottom-right-radius: 4px; } .make_it_left_shoes { left: 22px; -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1); -ms-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1) } .arm { width: 77px; height: 89px; background: #f1cb48; background: -moz-linear-gradient(-45deg, #F1CB48 0%,#F9D65C 24%,#E6BC3B 99%); background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#F1CB48), color-stop(24%,#F9D65C), color-stop(99%,#E6BC3B)); background: -webkit-linear-gradient(-45deg, #F1CB48 0%,#F9D65C 24%,#E6BC3B 99%); background: -o-linear-gradient(-45deg, #F1CB48 0%,#F9D65C 24%,#E6BC3B 99%); background: -ms-linear-gradient(-45deg, #F1CB48 0%,#F9D65C 24%,#E6BC3B 99%); background: linear-gradient(135deg, #F1CB48 0%,#F9D65C 24%,#E6BC3B 99%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1cb48', endColorstr='#e6bc3b',GradientType=1 ); top: 192px; border-bottom-left-radius: 11px; border-top-left-radius: 55px; z-index: 5555; -webkit-transform: rotate(27deg); -moz-transform: rotate(27deg); -ms-transform: rotate(27deg); -o-transform: rotate(27deg); transform: rotate(27deg); left: -12px; } .arm:before { position: absolute; content: ''; width: 36px; height: 19px; background-color: #F3CF55; top: 76px; left: -7px; -webkit-transform: rotate(69deg); -moz-transform: rotate(69deg); -ms-transform: rotate(69deg); -o-transform: rotate(69deg); transform: rotate(69deg); border-bottom-left-radius: 19px; border-bottom-right-radius: 9px; } .arm:after { position: absolute; content: ''; width: 52px; height: 16px; background-color: #FFF; top: 73px; left: 0px; -webkit-transform: rotate(72deg); -moz-transform: rotate(72deg); -ms-transform: rotate(72deg); -o-transform: rotate(72deg); transform: rotate(72deg); border-radius: 50%; } .hand { width: 19px; height: 11px; background-color: #231F20; left: -28px; top: 270px; z-index: 99999; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; -webkit-transform: rotate(4deg); -moz-transform: rotate(4deg); -ms-transform: rotate(4deg); -o-transform: rotate(4deg); transform: rotate(4deg); } .hand:before { width: 27px; position: absolute; content: ''; height: 25px; background-color: #231F20; left: 4px; top: 4px; border-bottom-left-radius: 10px; border-bottom-right-radius: 0px; border-top-left-radius: 3px; border-top-right-radius: 18px; -webkit-transform: rotate(-17deg); -moz-transform: rotate(-17deg); -ms-transform: rotate(-17deg); -o-transform: rotate(-17deg); transform: rotate(-17deg); } .hand:after { width: 14px; position: absolute; content: ''; height: 14px; background-color: #231F20; left: 7px; top: 21px; border-radius: 50%; } .hand_parts { width: 16px; height: 16px; background-color: #231F20; left: 19px; top: 21px; border-radius: 47%; } .hand_parts:after { position: absolute; content: ''; width: 16px; height: 16px; background-color: #231F20; left: 1px; top: -11px; border-radius: 47%; } .make_it_right_arm { left: 57px; -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1); -ms-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); top: 186px; height: 92px; z-index: -1; border-left: 14px #E6BC3B solid; } .make_it_right_hand { left: 137px; top: 266px; z-index: 7777; -webkit-transform: scaleX(-1) rotate(27deg); -moz-transform: scaleX(-1) rotate(27deg); -ms-transform: scaleX(-1) rotate(27deg); -o-transform: scaleX(-1) rotate(27deg); transform: scaleX(-1) rotate(27deg); } .hair1 { background-color: rgba(0, 0, 0, 0); width: 25px; height: 48px; top: -37px; border-radius: 53%; border-bottom-left-radius: 3px; border-left: solid #000 1px; left: 75px; -webkit-transform: rotate(8deg); -moz-transform: rotate(8deg); -ms-transform: rotate(8deg); -o-transform: rotate(8deg); transform: rotate(8deg); } .hair1:after { background-color: rgba(0, 0, 0, 0); position: absolute; content: ''; width: 25px; height: 35px; top: 14px; border-radius: 43%; border-bottom-left-radius: 1px; border-left: solid #000 1px; left: 1px; -webkit-transform: rotate(4deg); -moz-transform: rotate(4deg); -ms-transform: rotate(4deg); -o-transform: rotate(4deg); transform: rotate(4deg); } .hair1:before { background-color: rgba(0, 0, 0, 0); position: absolute; content: ''; width: 25px; height: 29px; top: 21px; border-radius: 43%; border-bottom-left-radius: 1px; border-left: solid #000 1px; left: 3px; -webkit-transform: rotate(11deg); -moz-transform: rotate(11deg); -ms-transform: rotate(11deg); -o-transform: rotate(11deg); transform: rotate(11deg); } .make_it_left_hair1 { left: 44px; -webkit-transform: scaleX(-1) rotate(13deg); -moz-transform: scaleX(-1) rotate(13deg); -ms-transform: scaleX(-1) rotate(13deg); -o-transform: scaleX(-1) rotate(13deg); transform: scaleX(-1) rotate(13deg); } .hair2 { background-color: rgba(0, 0, 0, 0); width: 25px; height: 48px; top: -43px; border-radius: 43%; border-bottom-left-radius: 3px; border-left: solid #000 1px; left: 73px; -webkit-transform: rotate(5deg); -moz-transform: rotate(5deg); -ms-transform: rotate(5deg); -o-transform: rotate(5deg); transform: rotate(5deg); } .hair2:before { background-color: rgba(0, 0, 0, 0); width: 25px; position: absolute; content: ''; height: 48px; border-radius: 43%; border-bottom-left-radius: 3px; border-left: solid #000 1px; left: -29px; -webkit-transform: scaleX(-1) rotate(15deg); -moz-transform: scaleX(-1) rotate(15deg); -ms-transform: scaleX(-1) rotate(15deg); -o-transform: scaleX(-1) rotate(15deg); transform: scaleX(-1) rotate(15deg); } .blue_borders { background-color: #35668F; width: 89px; height: 79px; top: 180px; left: 26px; z-index: 2; } .blue_borders:before { position: absolute; content: ''; background-color: #35668F; width: 91px; height: 17px; border-bottom-right-radius: 9px; -webkit-transform: rotate(-13deg); -moz-transform: rotate(-13deg); -ms-transform: rotate(-13deg); -o-transform: rotate(-13deg); transform: rotate(-13deg); top: 24px; left: 25px; } .blue_borders:after { position: absolute; content: ''; background-color: #35668F; width: 91px; height: 17px; border-bottom-left-radius: 9px; -webkit-transform: rotate(13deg); -moz-transform: rotate(13deg); -ms-transform: rotate(13deg); -o-transform: rotate(13deg); transform: rotate(13deg); top: 24px; left: -27px; } .white_light { width: 5px; height: 43px; left: 35px; background-color: #FFFFFF; opacity: 0.2; top: 2px; border-radius: 50%; -moz-box-shadow: 0px 3px 9px 8px rgba(0,0,0,1); box-shadow: 0px 3px 10px 8px #FFFFFF; -webkit-transform: rotate(49deg); -moz-transform: rotate(49deg); -ms-transform: rotate(49deg); -o-transform: rotate(49deg); transform: rotate(49deg); } .dark_light { width: 7px; height: 50px; top: 10px; left: 105px; background-color: #cd9f08; opacity: 0.2; border-radius: 50%; -moz-box-shadow: 0px 3px 10px 8px rgba(0,0,0,1); box-shadow: 0px 3px 10px 8px #cd9f08; -webkit-transform: rotate(-42deg); -moz-transform: rotate(-42deg); -ms-transform: rotate(-42deg); -o-transform: rotate(-42deg); transform: rotate(-42deg); } .pocket { width: 40px; height: 37px; background-color: #245580; top: 215px; z-index: 99999; left: 49px; -moz-box-shadow: 0px 0px 3px 0px rgba(19,54,82,1); box-shadow: 0px 0px 3px 0px #133652; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; border: 1px dotted #B6B6B6; } .pocket:after { width: 43px; height: 15px; position: absolute; content: ''; top: -9px; left: -1px; border-radius: 50%; background-color: #35668F; border-bottom: 1px dotted #B6B6B6; } .logo { background-color: #231F20; width: 19px; height: 19px; border-radius: 50%; top: 11px; right: 10px; } .logo:before { position: absolute; content: ''; background-color: #245580; width: 9px; height: 9px; top: 5px; left: 5px; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); } .logo:after { position: absolute; content: ''; background-color: #231F20; width: 5px; height: 5px; border-radius: 50%; top: 7px; left: 7px; } .lines { width: 5px; height: 1px; z-index: 9999; background-color: #231F20; top: 20px; right: 12px; } .lines:after { position: absolute; content: ''; width: 11px; height: 1px; z-index: 9999; background-color: #245580; top: 1px; right: -4px; } .curve1 { width: 40px; height: 29px; background-color: rgba(0, 0, 0, 0); top: 249px; z-index: 99999; left: 110px; border-bottom-left-radius: 20px; border-left: dotted 1px #FFF; box-shadow: 1px 0px 0px 0px #133652 inset; } .curve1:after { position: absolute; content: ''; width: 32px; top: -44px; height: 50px; border-bottom-right-radius: 20px; border-bottom-left-radius: 5px; border-bottom: dotted 1px #FFF; background-color: rgba(0, 0, 0, 0); } .make_it_left_curve { left: -11px; -webkit-transform: scaleX(-1); -moz-transform: scaleX(-1); -ms-transform: scaleX(-1); -o-transform: scaleX(-1); transform: scaleX(-1); } .curve2 { width: 91px; height: 29px; background-color: rgba(0, 0, 0, 0); top: 175px; z-index: 100000; left: 25px; border-bottom-left-radius: 50%; border-bottom-right-radius: 50%; border-bottom: dotted 1px #FFF; } .bill h2 { top: 364px; font-family: tahoma; font-size: 34px; font-weight: normal; left: 43px; color: #414141; } </style> </head> <body> <!-- HTML代码片段中请勿添加<body>标签 //--> <div class="container"> <div class="bill"> <div class="lights"> <span class="white_light"></span> <span class="dark_light"></span> </div> <div class="hair"> <span class="hair1"></span> <span class="hair1 make_it_left_hair1"></span> <span class="hair2"></span> </div> <div class="eyes"> <div class="eye_animate"></div> <div class="glasses"></div> <div class="white_part"> <div class="brown_eye"> <span class="black_part"></span> </div> </div> </div> <div class="black_tie"> <span class="right_tie"> <div class="top_tie"></div> <div class="down_tie"></div> </span> <span class="left_tie"> <div class="top_tie"></div> <div class="down_tie"></div> </span> </div> <div class="smile"></div> <div class="arm"></div> <div class="hand"> <span class="hand_parts"><span></span></span> </div> <div class="arm make_it_right_arm"></div> <div class="hand make_it_right_hand"> <span class="hand_parts"><span></span></span> </div> <div class="curves"> <span class="curve1"></span> <span class="curve1 make_it_left_curve"></span> <span class="curve2"></span> </div> <div class="clothes"> <div class="main"></div> <div class="blue_borders"></div> <div class="right_shirt"></div> <div class="right_shirt make_it_left"></div> <div class="bottom"></div> </div> <div class="pocket"> <div class="logo"></div> <span class="lines"></span> </div> <div class="legs"> <div class="right_leg"></div> <div class="right_leg make_it_left_leg"></div> <div class="shoes"> <span class="small_shoes"></span> </div> <div class="shoes make_it_left_shoes"> <span class="small_shoes"></span> </div> </div> </div> </div> <!-- 推荐开源CDN来选取需引用的外部JS //--> <script type="text/javascript" src="http://cdn.gbtags.com/jquery/1.11.1/jquery.min.js"></script> <script> /*Javascript代码片段*/ var setEyeOffset = function(event) { var offset = $(".black_part").offset(); var x1 = offset.left; var y1 = offset.top; var n1 = event.clientX - x1; var m1 = event.clientY - y1; if(n1>65){ n1=65; }else if(n1<5) { n1=5; } if(m1>45){ m1=45; }else if(m1<0) { m1=0; } $(".black_part").html("");//清空CSS $('.black_part').append("<style> .brown_eye{left:"+(n1/2)+"px;top:"+(m1/2)+"px;}</style>");//頁面添加新的樣式 }; $(window).mousemove(setEyeOffset); </script> </body> </html>
.
相关推荐
综上所述,通过熟练运用CSS的`transform`属性、定位以及伪元素,我们可以创建出富有表现力的动态小黄人效果。实践过程中,需要注意代码的可维护性和性能优化,确保动画流畅且不影响页面其他元素的正常显示。不断尝试...
闲暇时间看了一下CSS3,并用CSS3写了一个最近很流行的小黄人
这个名为“CSS3绘制小黄人头像动画代码”的资源正是利用了CSS3的特性,实现了小黄人头像的动态效果。小黄人作为流行文化中的标志性角色,其可爱的形象深受喜爱,将其转化为CSS3动画无疑增加了网页的趣味性和吸引力。...
css实现小黄人图像的制作与动画效果的实现,自己尝试完成的。
总的来说,这个小黄人眨眼动画源码是一个很好的学习案例,展示了CSS3如何通过关键帧动画实现动态效果,同时也提醒我们,即使没有JavaScript,仅靠CSS也能创造丰富的用户体验。通过对这个源码的分析和学习,我们可以...
4. **动画和过渡**:CSS3的`@keyframes`规则让我们能定义动画序列,而`transition`属性则用于平滑地改变一个或多个CSS属性,这些在小黄人头像的动态效果中会非常关键。 5. **响应式设计**:虽然这不是标题直接指出...
在本项目中,“纯CSS3实现卡通小黄人头像特效.zip”是一个包含前端开发资源的压缩包,它利用HTML5、jQuery、JavaScript以及CSS3技术来创建一个动态的、吸引人的卡通小黄人头像效果。这个效果可能是通过动画、变换和...
在描述中提到的“根据预览到的效果生成css脚本”,这是CSS代码生成器的核心功能。用户可以在界面上选择不同的样式属性,如背景色、边框宽度、文字样式等,并即时看到这些改变在预览窗口中的效果。一旦满意,工具会...
在本文中,我们将深入探讨如何使用CSS3技术创建一个可爱的小黄人形象。CSS3是层叠样式表的最新版本,提供了丰富的样式控制和动画功能,使得开发者能够创建出复杂且富有表现力的网页元素。 首先,我们看到HTML结构中...
CSS特效代码生成器是一种在线工具,它可以帮助开发者快速生成各种视觉效果的CSS代码,包括但不限于动画、过渡、布局、按钮样式、图标、导航菜单、滑块等。通过这些生成器,用户可以自定义参数,如颜色、大小、位置、...
2.需要使用css3中的至少两种效果,并且用到css3的地方请注释,例如阴影效果,动画效果,2D转换,3D转换,css3过渡等等。 3.要求css样式写在head的style里,或者新建一个css文件写在里面。图片放在单独建立的文件夹下...
3. **实时预览**:在生成CSS代码的同时,用户可以实时查看页面的视觉效果,便于调整样式和布局。 4. **响应式设计**:现代网页设计强调响应式,CSS标签自动生成器可能会支持创建适应不同设备屏幕大小的样式,如手机...
例如,我们可以使用CSS的`transform`属性实现位移、缩放、旋转等效果,然后通过JavaScript来更改这些属性值,从而实现根据鼠标位置动态调整动画效果。 在CSS中,我们可以设置一个动画关键帧(@keyframes)来定义...
【标题】"眼睛会动的小黄人CSS3特效.zip"是一个包含CSS3技术实现的动态小黄人眼部动画效果的资源包。这个特效利用了CSS3的高级特性,如动画(animation)、变换(transform)以及伪类(pseudo-classes)等,为网页...
CSS3效果代码生成工具,方便实用,祝大家好好学习,天天向上
CSS3实现波纹特效和H5实现动态波浪效果是前端网页设计中常见的视觉表现形式,主要通过CSS3的相关属性和方法来创建动态和富有美感的视觉效果,以下详细说明这些知识点。 首先,CSS3是HTML5的主要样式表语言,其通过...
【CSS菜单动态生成器】是一款专为WINDOW操作系统设计的工具,旨在帮助用户快速、便捷地创建自定义CSS样式菜单。这款软件简化了CSS菜单的制作流程,使得即使是对编程不甚了解的用户也能轻松实现个性化网页导航设计。 ...
css代码自动生成
跨年烟花代码由html5 CSS3 jquery生成的烟花动画效果,烟花升空爆炸炫丽动画源码,烟花的数量、大孝高度都随机,且烟花散开的效果五颜六色,很漂亮噢。烟花爆炸一瞬间的动画效果很逼真,很自然,全屏查看效果,更棒...