<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>盒模型的拉升放大收缩</title>
    <style type="text/css">
        .box{
            width:100px;
            height:100px;
            background:grey;
            border:5px solid green;
            resize:both;
            overflow:auto;//resize 和 overflow 一起配合使用才可以
        }

    </style>
</head>
<body>
<div class="box">

</div>
</body>
</html>
   <style type="text/css">
        .box{
            width:100px;
            height:100px;
            background:grey;
            border:5px solid green;
            resize:both;
            overflow:auto;
        }

    </style>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.