css实现鼠标悬浮书本封面图片显示三维立体效果代码

代码语言:html

所属分类:悬停

代码描述:css实现鼠标悬浮书本封面图片显示三维立体效果代码

代码标签: css 鼠标 悬浮 书本 封面 图片 三维 立体

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

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

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

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

body{
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-color: #D29EDF; 
}

.container{
  width: 250px; height: 400px;
  perspective: 1000px;
  cursor: pointer;
}

.image{
  width: 100%; height: 100%;  
  transform-style: preserve-3d;
  background-position: center;
  transition: all 0.3s;
  position: relative;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.image::before{
  content: "&q.........完整代码请登录后点击上方下载按钮下载查看

网友评论0