zoukankan      html  css  js  c++  java
  • css悬浮

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="UTF-8">  
      <title>2 different hover effects - CodePen</title>


      <style>
    .hover-set1,.hover-set2 {
      790px;
      height: 300px;
      margin: 0 auto;
      margin-top: 25px;
    }

    .hover-set1 .hover-img {
      250px;
      height: 250px;
      margin: 5px;
      float: left;
      background: #222;
      position: relative;
    }
    .hover-set1 .hover-img .caption {
      background: #DB485E;
      padding: 15px 20px;
      position: relative;
      bottom: 0;
      z-index:1000;
      opacity: 0;
    }
    .hover-set1 .hover-img:hover .caption {
      opacity: 1;
     
    }
    </style>

    </head>

    <body>

    <div class="hover-set1">

      <h1>HOVER DEMO 1</h1>


    <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/6.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>

    <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/2.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>

    <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/3.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>
    </div>

    <div class="hover-set1">
      <h1>HOVER DEMO 2</h1>

      <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/4.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>

    <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/5.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>

    <div class="hover-img">
      <div class="img">
        <img src="http://www.zaole.net/7.jpg" height="250" alt="image 1" />
      </div>
      <div class="caption">
        <p>Lorem ipsum dolor sit amet, con sectetur adipiscing elit.</p>
        <a href="#">More details</a>
      </div>
    </div>
    </div>


    </body>
    </html>

  • 相关阅读:
    POJ 1392 Ouroboros Snake 欧拉回路
    POJ 1275 Cashier Employment 差分约束+二分答案
    POJ 1780 Code 欧拉回路+手写栈DFS
    POJ 1300 Door Man 欧拉路的判断
    HDU1534 Schedule Problem 差分约束
    POJ 3169 Layout 差分约束
    POJ 1364 King 差分约束 找负环
    ZOJ 2770 Burn the Linked Camp 差分约束+SPFA
    Zoj 2027 Travelling Fee 最短路变形
    Poj 2263 Heavy Cargo Floyd 求最大容量路
  • 原文地址:https://www.cnblogs.com/lyd96321/p/5847584.html
Copyright © 2011-2022 走看看