zoukankan      html  css  js  c++  java
  • css3 放大scale

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    body,ol,ul,h1,h2,h3,h4,h5,h6,p,th,td,dl,dd,form,fieldset,legend,input,textarea,select,figure,figcaption{margin:0;padding:0}
    body{font:14px"微软雅黑","Arial Narrow",HELVETICA;}
    figure{
    float: left;
    33%;
    overflow: hidden;
    position: relative;
    background: #2f0000;
    }
    figure img{
    height: 400px;
    opacity: 0.9;
    transition: all 1s;
    }
    figcaption{
    position: absolute;
    left: 0;
    top: 0;
    100%;
    height: 100%;
    }
    figcaption h3{
    color: #ffffff;
    margin: 10% 0 0 12%;
    transition: all 1s;
    transform: sacle(1.2,1.2);
    opacity: 0;
    }
    figcaption p{
    background:#ffffff;
    color: #000000;
    margin:15px;
    font-size: 13px;
    text-align: center;
    130px;
    height: 20px;
    line-height: 20px;
    transition: all 1s;
    transform: sacle(1.2,1.2);
    opacity: 0;
    }
    figcaption div{
    border: 2px solid #ffffff;
    80%;
    height: 80%;
    position: absolute;
    top: 10%;
    left: 10%;
    transition: all 1s;
    transform: sacle(1.2,1.2);
    opacity: 0;
    }
    figure:hover figcaption div{
    transform: scale(1,1);
    opacity: 1;
    }
    figure:hover img{
    opacity: 0.5;
    transform: scale(1.2,1.2);
    }

    figure:hover figcaption h3{
    transform: scale(1,1);
    opacity: 1;
    }
    figure:hover figcaption p{
    transform: scale(1,1);
    opacity: 1;
    }
    </style>
    </head>
    <body>

    <figure>
    <img src="images/2.jpg">
    <figcaption>
    <h3>标题标题</h3>
    <p>文字文字文字文字</p>
    <div></div>
    </figcaption>
    </figure>
    <figure>
    <img src="images/3.jpg">
    <figcaption>
    <h3>标题标题</h3>
    <p>文字文字文字文字</p>
    </figcaption>
    </figure>
    </body>
    </html>

    
    
  • 相关阅读:
    如何打开肉鸡的3389端口(xp的)
    XP鲜为人知的实用技巧(一)
    利用Ms08067工具进行溢出攻击
    教你建一个别人看不到打不开的文件夹
    在IE上显示自己的名字
    QQ使用的七大非常规秘籍
    第五篇:Python函数基础篇
    Centos7之Systemd(Service文件)详解
    Linux GCC make文件的写法3
    DSP/BIOS学习笔记——2.SWI
  • 原文地址:https://www.cnblogs.com/yuanyuan-1994/p/8733483.html
Copyright © 2011-2022 走看看