css布局实现三维3d纸张翘边悬浮效果代码

代码语言:html

所属分类:悬停

代码描述:css布局实现三维3d纸张翘边悬浮效果代码

代码标签: 三维 3d 纸张 翘边 悬浮 效果

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

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

<head>

  <meta charset="UTF-8">
  

  
  
<style>
@charset "UTF-8";
/* Base page styles */
body {
  font-family: 'PT Sans', sans-serif;
  background-color: #f1f1f1;
  text-align: center;
}

h2 {
  text-transform: uppercase;
  font-size: 16px;
  margin-bottom: 0;
  padding-top: 20px;
  border-top: 1px solid #ccc;
}
h2.no-separator {
  border: none;
}

ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  text-align: center;
}

li {
  display: inline-block;
  margin: 0 20px;
}

/* Base Button Style */
.btn {
  position: relative;
  display: block;
  width: 250px;
  margin: 20px auto;
  padding: 10px;
  background-color: #fff;
  border: 1px solid #ccc;
  color: #000;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transform-style: flat;
  transition: all 250ms ease-out;
}
.btn:before, .btn:after {
  content: "";
  position: absolute;
  z-index: -2;
  transition: all 250ms ease-out;
}

/* Paper effect – slightly raised off background */
.paper {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(128, 128, 128, 0.1) inset;
  border-color: #dedede;
}

/* Raised effect – pushes up on hover */
.paper-raise:before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.paper-raise:hover {
  border: 1px solid #fff;
}
.paper-raise:hover:before {
  box-shadow: 0 15px 10px -10px rgba(31, 31, 31, 0.5);
}

.paper-raise-flatten {
  border-color: #fff;
  box-shadow: none;
}
.paper-raise-flatten:before {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 15px 10px -10px rgba(31, 31, 31, 0.5);
}
.p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0