js实现鼠标跟随前后层分界效果代码
代码语言:html
所属分类:悬停
代码描述:js实现鼠标跟随前后层分界效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Lobster&family=Rubik:wght@400;500&display=swap" rel="stylesheet"> <style> :root { --yellow: rgb(253, 216, 53); --blue: rgb(98, 0, 234); --dark: rgb(20, 20, 20); } body { background-color: var(--dark); margin: 0px; } .side { display: grid; height: 100vh; overflow: hidden; place-items: center; position: absolute; width: 100%; } .side .title { font-family: "Rubik", sans-serif; font-size: 8vw; margin: 0px 10vw; width: 80vw; } .side .fancy { font-family: "Lobster", cursive; font-size: 1.3em; line-height: 0.8em; } #left-side { .........完整代码请登录后点击上方下载按钮下载查看
网友评论0