react实现鼠标跟随悬浮照片层叠移动交互动画效果代码
代码语言:html
所属分类:悬停
代码描述:react实现鼠标跟随悬浮照片层叠移动交互动画效果代码
代码标签: react 鼠标 跟随 悬浮 照片 层叠 移动 交互 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic'>
<style>
*,
*::after,
*::before {
box-sizing: 0;
margin: 0;
padding: 0;
background-color: rgb(197, 197, 197);
}
body {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}
.container {
width: 200px;
height: 200px;
position: relative;
}
img {
width: 100%;
position: absolute;
transition: 0.3s left linear, 0.3s bottom linear;
border-radius: 20px;
cursor: pointer;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 10px 0px;
}
</style>
</head>
<body class="preload">
<div id="root"></div>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/babel.min.js"></script>
<script type="text/javascript" src="//repo.bfw.wiki/bfwr.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0