css+js实现立体鼠标跟随交互视觉差异相框相册效果代码

代码语言:html

所属分类:视觉差异

代码描述:css+js实现立体鼠标跟随交互视觉差异相框相册效果代码

代码标签: css js 立体 鼠标 跟随 交互 视觉 差异 相框 相册

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

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
        * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      transition: all 0.2s ease;
    }
    
    body {
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
      background: linear-gradient(60deg, darkcyan 50%, coral 50.1%);
      overflow: hidden;
      perspective: 2000px;
    }
    
    .container {
      transform-style: preserve-3d;
      border-radius: 30px;
      background: #333;
      box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5);
      padding: 15px;
    }
    
    .container .card-container {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
    }
    
    .container .card-container .card {
      height: 350px;
      width: 250px;
      overflow: hidden;
      position: relative;
      margin: 15px;
      border-radius: 15px;
      box-shadow: 0 10px 15px rgba(0, 0, 0, 0.9);
      border: 4px solid #fff;
    }
    
    .container .card-container .card .background {
      height: 100%;
      width: 100%;
      object-fit: cover;
      transform: scale(1.1);
      filter: blur(2.5px);
    }
    
    .container .card-container .card .girl {
      position: absolute;
      bottom: -25px;
      left: 0;
      height: 100%;
      width: 100%;
      transform-style: preserve-3d;
    }
    </style>
</head>

<body>
    <div class="container" style="transform: rotateX(-5.76667deg) rotateY(6.81667deg);">
        <div class="card-container">
            <div class="card">
              .........完整代码请登录后点击上方下载按钮下载查看

网友评论0