js+css实现跟随眼睛鼠标交互的黑猫效果代码
代码语言:html
所属分类:其他
代码描述:js+css实现跟随眼睛鼠标交互的黑猫效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> html, body, .container { margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; height: 100%; background: linear-gradient(skyblue, dodgerblue); } div { position: absolute; box-sizing: border-box; } .face { height: 200px; width: 200px; background: black; border-radius: 100%; } [class^=cheek] { height: 80px; width: 80px; background: #111; border-radius: 100%; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -30px 20px gray; } .cheek-left { transform: translateX(-50px) translateY(10px); } .cheek-right { transform: translateX(50px) translateY(10px); } .snoot { height: 130px; width: 130px; background: gray; border-radius: 100%; transform: translateY(50px); } [class^=eye] { height: 60%; width: 60%; background: linear-gradient(to top, mediumseagreen 50%, black); border-width: 1px 6px; border-color: black; border-style: solid; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 0px 20px 0px black; } .eye-left { border-radius: 40% 100% 30% 100%; } .eye-right { border-radius: 100% 30% 100% 40%; } .pupil { height: 50.........完整代码请登录后点击上方下载按钮下载查看
网友评论0