返回前端案例实战/......登陆

前端案例实战/鼠标移上图片放大(css)

小弟,抱着学习的心态,前来观摩2019-05-23 23:37:39380
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>JQuery垂直三级导航</title>
    <script src="http://code.jquery.com/jquery-3.4.1.min.js"></script>
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <style type="text/css">
        .box{
            width: 900px;
            height: 700px;
            background: lightgreen;
            margin: 0 auto;
            border-radius: 4px;
        }
        .pic{
            width: 300px;
            height: 200px;
            margin: 100px auto;
            float: left;
        }
        .pic img{
            border-radius: 6px;
            transition: all 0.5s; /* 定义图片放大过程的秒数 */
        }
        .pic:hover img{
            height: 200px;
            width: 300px;
            transform: scale(1.5);
            box-shadow: 1px 10px 10px hotpink;
            border: 4px dashed #616161;
        }
    </style>
    <script>
        
    </script>
</head>
<body style="background: #eee;">
    <div class="box">
        <div class="pic">
            <img src="08.jpg" width="300" height="200">
        </div>   
        <div class="pic">
            <img src="08.jpg" width="300" height="200">
        </div>
        <div class="pic">
            <img src="08.jpg" width="300" height="200">
        </div>

        <div class="pic" style="margin: 0px auto;">
            <img src="08.jpg" width="300" height="200">
        </div>   
        <div class="pic" style="margin: 0px auto;">
            <img src="08.jpg" width="300" height="200">
        </div>
        <div class="pic" style="margin: 0px auto;">
            <img src="08.jpg" width="300" height="200">
        </div>
    </div>
</body>
</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送