<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style type="text/css">
.divFrame{
border: 1px solid #CCCCCC;
background-color: #EEEEEE;
width: 60px;
height: 60px;
font-size: 13px;
padding: 5px;
}
</style>
<script src="../js/jquery-3.5.1.js"></script>
<script>
$(function () {
$(".divFrame").click(function () {
$(this).animate({
width:"20%",
height:"70px"
},2000,function () {
$(this).css("border","3px solid #666666")
.html("变大了");
});
});
});
</script>
</head>
<body>
<div class="divFrame">
点击变大
</div>
</body>
</html>