CSS resize 基本示例
html公开前 25 行,完整代码需登录
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS resize 基本示例</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
}
/* 同时调整宽度和高度 */
.resizable-both {
width: 200px;
height: 150px;
border: 2px solid #3498db;
padding: 10px;
overflow: auto;
resize: both;
background-color: #ecf0f1;
margin-bottom: 20px;
}
/* 仅调整宽度 */