zoukankan      html  css  js  c++  java
  • css3实现图片遮罩效果鼠标hover以后出现文字

    <!doctype html> 
    <html> 
    <head> 
    <meta charset="utf-8"> 
    <title>无标题文档</title> 
    <style> 
    #content article { 
    float: left; 
    margin-right: 4%; 
    max- 236px; 
    position: relative; 
     22%; 
    margin-bottom: 3.5%; 
    } 
    #content article:nth-child(4n+4) { 
    margin-right: 0; 
    } 
    .post-format-content { 
    position: relative; 
    background: #111; 
    } 
    .post-thumbnail { 
    max- 100%; 
    height: auto; 
    overflow: hidden; 
    } 
    .content-wrap { 
    padding: 0; 
    position: absolute; 
    text-align: center; 
     100%; 
    top: 0; 
    bottom: 0; 
    display: table-cell; 
    vertical-align: middle; 
    overflow: hidden; 
    } 
    .content-wrap h1.entry-title { 
    display: table; 
    font-size: 110%; 
    height: 100%; 
    text-transform: uppercase; 
     100%; 
    margin:0; 
    } 
    .edit-link { 
    z-index: 2; 
    } 
    .featured-image { 
    display: table-cell; 
    position: relative; 
    transition: opacity .25s ease-in-out, background .25s ease-in-out; 
    -moz-transition: opacity .25s ease-in-out, background .25s ease-in-out; 
    -webkit-transition: opacity .25s ease-in-out, background .25s ease-in-out; 
    vertical-align: middle; 
    z-index: 1; 
    color: #fff; 
    text-decoration: none; 
    opacity: 0; 
    padding: 10%; 
    } 
    .featured-image:hover { 
    opacity: 0.9; 
    color: #fff; 
    background: rgba(0,0,0,0.8); 
    } 
    .post-thumbnail img { 
    display: block; 
    } 
    img { 
    max- 100%; 
    height: auto; 
    } 
    </style> 
    </head> 
    <body> 
    <div id="content"> 
    <article class="post-152 post type-post status-publish format-standard hentry category-people category-photos"> 
    <div class="post-format-content"> 
    <div class="post-thumbnail"> <img width="480" height="640" src="assets/img/1.jpg" class="attachment-thumbnail wp-post-image" alt="105694702"> </div> 
    <div class="content-wrap"> 
    <h1 class="entry-title"><a href="" class="featured-image" rel="bookmark">Music & Fashion</a></h1> 
    </div> 
    </div> 
    </article> 
    <article class="post-152 post type-post status-publish format-standard hentry category-people category-photos"> 
    <div class="post-format-content"> 
    <div class="post-thumbnail"> <img width="480" height="640" src="assets/img/2.jpg" class="attachment-thumbnail wp-post-image" alt="105694702"> </div> 
    <div class="content-wrap"> 
    <h1 class="entry-title"><a href="" class="featured-image" title="amp; Fashion" rel="bookmark">Music & Fashion</a></h1> 
    </div> 
    </div> 
    </article> 
    </div> 
    </body> 
    </html> 
  • 相关阅读:
    2020系统综合实践 第1次实践作业
    软工实践个人总结
    2019 SDN大作业
    HDU 4965 Fast Matrix Calculation (矩阵快速幂取模----矩阵相乘满足结合律)
    HDU 1565 (最大流+黑白染色化二分图求最小割)
    HDU 4289 Control (最大流+拆点)
    HDU 3605 Escape(最大流+缩点转换)
    HDOJ4886(hash+枚举)
    POJ 2446 Chessboard (二分匹配)
    POJ 1469 COURSES (二分匹配,邻接表)
  • 原文地址:https://www.cnblogs.com/SJP666/p/4728642.html
Copyright © 2011-2022 走看看