zoukankan      html  css  js  c++  java
  • 2018.08.07css实现图片放大

    css实现图片放大

    一、html代码

    <!--  鼠标移入时图片放大-->
      <div class="body6">
        <div class="imgbox1" >
           <img class="body6p1"src="img/block3-1.jpg" alt="">   
        </div>
        <div class="imgbox2">
           <img class="body6p2"src="img/block3-2.jpg" alt="">
        </div>
          <div class="imgbox3">
              <img class="body6p3"src="img/block3-3.jpg" alt="">
          </div>
      </div>

    二、css代码

    /*鼠标移入放大图片*/
    .body6p1{
         330px;
        height: 220px;
         cursor: pointer;
      transition: all 0.6s;
        
    }
    .body6p1:hover{
         transform: scale(1.1);
    }
    .body6p2{
         330px;
        height: 220px;
         cursor: pointer;
      transition: all 0.6s;
        
    }
    .body6p2:hover{
         transform: scale(1.1);
    }
    .body6p3{
         330px;
        height: 220px;
         cursor: pointer;
      transition: all 0.6s;
        
    }
    .body6p3:hover{
         transform: scale(1.1);
    }
    .imgbox1{
         330px;
        height: 375px;
        float: left;
        margin-top: -8%;
        margin-left: 174px;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        overflow: hidden;

    }
    .imgbox2{
         330px;
        height: 375px;
        float: left;
        margin-top: -8%;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        overflow: hidden;
    }
    .imgbox3{
         330px;
        height: 375px;
        float: left;
        margin-top: -8%;
        text-align: center;
        font-size: 20px;
        font-weight: bold;
        overflow: hidden;
    }

  • 相关阅读:
    String驻留带来的危害
    Go语言的堆栈分析
    SecureCRT使用技巧
    Javascript中相同Function使用多个名称
    记录Office Add-in开发经验
    Silverlight和WPF中DataContractJsonSerializer对时间的处理差异
    ASP.NET MVC项目实践技巧
    有点担心Node.js的未来了
    回首经典的SQL Server 2005
    duilib关于学习Demo中的QQ
  • 原文地址:https://www.cnblogs.com/sccwxl/p/9437532.html
Copyright © 2011-2022 走看看