css实现图片卡片悬浮文字底部弹出效果代码

代码语言:html

所属分类:悬停

代码描述:css实现图片卡片悬浮文字底部弹出效果代码

代码标签: css 图片卡片 悬浮 文字 底部 弹出

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

<html>

<head>
    <style>
        @import url(https://fonts.googleapis.com/css?family=Oswald);
        @import url(https://fonts.googleapis.com/css?family=Quattrocento);
        /* Demo purposes only */
        html {
          height: 100%;
        }
        body {
          background-color: #212121;
          display: flex;
          justify-content: center;
          align-items: center;
          flex-flow: wrap;
          margin: 0;
          height: 100%;
        }
        .snip1361 {
          font-family: 'Quattrocento', Arial, sans-serif;
          position: relative;
          overflow: hidden;
          margin: 10px;
          min-width: 230px;
          max-width: 315px;
          width: 100%;
          color: #141414;
          text-align: left;
          line-height: 1.4em;
          font-size: 16px;
        }
        .snip1361 * {
          -webkit-box-sizing: border-box;
          box-sizing: border-box;
          -webkit-transition: all 0.35s ease;
          transition: all 0.35s ease;
        }
        .snip1361 img {
          max-width: 100%;
          vertical-align: top;
        }
        .snip1361 figcaption {
          position: absolute;
          top: calc(77%);
          width: 100%;
          background-color: #ffffff;
          padding: 15px 25px 65px;
        }
        .snip1361 figcaption:before {
          position: absolute;
          content: '';
          z-index: 2;
          bottom: 100%;
          left: 0;
          width: 100%;
          height: 80px;
          background-image: -webkit-linear-gradient(top, transparent 0%, #ffffff 100%);
          background-image: linear-gradient(to bottom, transparent 0%, #ffffff 100%);
        }
        .snip1361 h3,
        .snip1361 p {
          margin: 0 0 10px;
        }
        .snip1361 h3 {
          font-weight: 300;
          font-size: 1.4em;
    .........完整代码请登录后点击上方下载按钮下载查看

网友评论0