div+css实现悬浮翻书显示内容效果代码

代码语言:html

所属分类:悬停

代码描述:div+css实现悬浮翻书显示内容效果代码

代码标签: div css 悬浮 翻书 显示 内容

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

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

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

  
  
  
  
<style>
@import url('https://fonts.googleapis.com/css?family=Quicksand');
body
{
	margin: 0;
	padding: 0;	
	background: #708d00;
	font-family: 'Quicksand', sans-serif;
}
.card
{
	position: absolute;
	top: 50%;
	left: 50%;
	width: 300px;
	height: 400px;
	background: #fff;
	transform-style: preserve-3d;
	transform: translate(-50%,-50%) perspective(2000px);
	box-shadow: inset 300px 0 50px rgba(0,0,0,.5), 0 20px 100px rgba(0,0,0,.5);
	transition: 1s;
}
.card:hover
{
	transform: translate(-50%,-50%) perspective(2000px) rotate(-10deg);
	box-shadow: inset 20px 0 50px rgba(0,0,0,.5), 0 10px 100px rgba(0,0,0,.5);
}
.card:before
{
	content: '';
	position: absolute;
	top: -5px;
	left: 0;
	width: 100%;
	height: 5px;
	background: #475b02;
	transform-origin: bottom;
	transform: skewX(-45deg);
}
.card:after
{
	content: '';
	position: absolute;
	top: 0;
	right: -5px;
	width: 5px;
	height: 100%;
	background: #7ea301;
	transform-origin: left;
	transform: skewY(-45deg);
}
.card .img.........完整代码请登录后点击上方下载按钮下载查看

网友评论0