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>

    
    
  • 相关阅读:
    如何完全禁用或卸载Windows 10中的OneDrive
    ASP.NET Web API从注释生成帮助文档
    c#中使用easyUI的DataGrid组件
    第三方分页控件aspnetPager出现问题解决方法
    ActionResult派生类
    Razor引擎的转换数据类型
    ViewData与ViewBag比较
    .net开源后可以查看的源代码
    如何让一个类可以被foreach枚举?
    .NET Framework中Object基类有哪些方法?
  • 原文地址:https://www.cnblogs.com/yuanyuan-1994/p/8733483.html
Copyright © 2011-2022 走看看