css实现鼠标悬浮光晕模糊跟随效果代码

代码语言:html

所属分类:悬停

代码描述:css实现鼠标悬浮光晕模糊跟随效果代码

代码标签: css 鼠标 悬浮 光晕 模糊 跟随

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
body {
  margin: 0 auto;
  background: linear-gradient(45deg, #111, #333);
/*       background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab); */
  	background-size: 400%;
	animation: gradient 15s ease infinite;
  height: 100vh;
  display:grid;
  grid-template-columns: 300px 300px;
  grid-template-rows: 200px 200px;
  grid-column-gap: 20px;
  grid-row-gap: 20px;
    justify-content: center;
  align-content: center;
}
@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}
.div {
  width: 300px;
  height: 200px;
  overflow: hidden;
  position: relative;
    z-index: 5;
  transition: .7s;
     border-radius: 15px;
}
.div:hover {
  text-shadow: 0px 0px 30px #ffffff99;
}
.div-text {
  width: inherit;
  height: inherit;
   border-radius: 15px;
  background: #ffffff10;
  border: 1px solid #ffffff20;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: sans-serif;
  font-size: 20px;
  position: absolute;
  z-index: 5;
  box-sizing: border-box;
  text-transform: uppercase;
}
.div-shadow {
  display: block;
  content: '';
  width: 0px;
  height: 0px;
  box-shadow: 0px 0px 100px 100px #ffffff20;
  background: red;
  position: absolute;
  transition: opacity .7s;
  opacit.........完整代码请登录后点击上方下载按钮下载查看

网友评论0