js实现蜂窝六边形发光跟随鼠标移动效果代码

代码语言:html

所属分类:悬停

代码描述:js实现蜂窝六边形发光跟随鼠标移动效果代码

代码标签: js 蜂窝 六边形 发光 跟随 鼠标 移动

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
 
<meta charset="UTF-8">
 


 
 
<style>
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #131217;
  width: 100%;
  height: 100vh;
  position: relative;
  display: grid;
  place-content: center;
  font-family: Montserrat;
  overflow: hidden;
}

h1 {
  font-size: 8rem;
  font-weight: 700;
  color: white;
  position: relative;
  z-index: 2;
  text-align: center;
}

#pattern {
  position: absolute;
  top: -44px;
  left: -50px;
  right: 0;
  bottom: 0;
}

#gradient {
  background: radial-gradient(#ff8811, transparent 50%);
  width: 400px;
  height: 400px;
  position: absolute;
  top: -200px;
  left: -200px;
  transform: translate(200px, 200px);
}

/* -- youtube link styling -- */

.links {
  border-top: 1px solid #ffffff50;
  border-right: 1px solid #ffffff50;
  border-top-right-radius: 0.5rem;
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 0.5rem;
  font-family: Montserrat;
  font-size: 1.2rem;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  & > a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.5;
    &:hover {
      opac.........完整代码请登录后点击上方下载按钮下载查看

网友评论0