首先上两张图,对比一下 鼠标未经过和鼠标悬浮的效果

css实现鼠标滑过图片 放大阴影(3D)效果

css实现鼠标滑过图片 放大阴影(3D)效果

中间还有动画效果,要自己看效果才能体会了,下面上代码

 

 

  // css    
       div{
            text-align: center;
        }
        a{
            display: inline-block;
            text-decoration: none;
            transition: all .3s ease;
        }
        a:hover {
            transform: translateY(-6px);
            -webkit-transform: translateY(-6px);
            -moz-transform: translateY(-6px);
            box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .5);
            -webkit-box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .5);
            -moz-box-shadow: 0 26px 40px -24px rgba(0, 36, 100, .5);
        }
        .i-subject-head{
            overflow: hidden;
        }
        .i-subject-wrap img{
            width: 100%;
            -webkit-transition: -webkit-transform .3s;
        }
        a:hover .i-subject-wrap img{
            -webkit-transform: scale(1.1);
            transform: scale(1.1);
        }
<div>
    <a href="" target="_blank" title="">
        <div class="i-subject-wrap">
            <div class="i-subject-head">
                <img src="http://cdn.alloyteam.com/assets/img/alloystick-d2c55e.jpg">
            </div>

        </div>
    </a>
</div>

 

相关文章:

  • 2021-11-01
  • 2021-08-15
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
猜你喜欢
  • 2021-10-24
  • 2022-12-23
  • 2021-05-27
  • 2021-11-25
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案