css实现鼠标悬浮图片文字层翻转显示动画效果代码

代码语言:html

所属分类:悬停

代码描述:css实现鼠标悬浮图片文字层翻转显示动画效果代码

代码标签: css 鼠标 悬浮 图片 文字 翻转 显示 动画

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

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

<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/ionicons.css">
    <style>
     html {
  height: 100%;
}
body {
  background-color: #212121;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: wrap;
  margin: 0;
  height: 100%;
}
    @import url(https://fonts.googleapis.com/css?family=Raleway:400,500,800);
    figure.snip1321 {
      font-family: 'Raleway', Arial, sans-serif;
      position: relative;
      overflow: hidden;
      margin: 10px;
      min-width: 230px;
      max-width: 315px;
      width: 100%;
      color: #000000;
      text-align: center;
      -webkit-perspective: 50em;
      perspective: 50em;
    }
    figure.snip1321 * {
      -webkit-box-sizing: padding-box;
      box-sizing: padding-box;
      -webkit-transition: all 0.2s ease-out;
      transition: all 0.2s ease-out;
    }
    figure.snip1321 img {
      max-width: 100%;
      vertical-align: top;
    }
    figure.snip1321 figcaption {
      top: 50%;
      left: 20px;
      right: 20px;
      position: absolute;
      opacity: 0;
      z-index: 1;
    }
    figure.snip1321 h2,
    figure.snip1321 h4 {
      margin: 0;
    }
    figure.snip1321 h2 {
      font-weight: 600;
    }
    figure.snip1321 h4 {
      font-weight: 400;
      text-transform: uppercase;
    }
    figure.snip1321 i {
      font-size: 32px;
    }
    figure.snip1321:after {
      background-color: #ffffff;
      position: absolute;
      content: "";
      display: block;
      top: 20px;
      left: 20px;
      right: 20px;
      bottom: 20px;
      -webkit-transition: all 0.4s ease-in-out;
      transition: all 0.4s ease-in-out;
      -webkit-transform: rotateX(-90deg);
      transform: rotateX(-90deg);
      -webkit-transform-origin: 50% 50%;
      -ms-transform-origin: 50% 50%;
      transform-origin: 50% 50%;
      opacity: 0;
    }
    figure.snip1321 a {
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      position: absolute;
      z-index: 1;
    }
    figure.snip1321:hover figcaption,
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0