左下角怎么做到边框里面还加滚动条
就是设置css的 overflow: scroll 或auto;
你题目的解答代码如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title> 页面名称 </title>
<style type="text/css">
#box {
width: 200px;
height: 300px;
background-color: #eee;
overflow-y: scroll;
}
</style>
</head>
<body>
<div id="box">
<p>text1</p>
<p>text2</p>
<p>text3</p>
<p>text4</p>
<p>text5</p>
<p>text6</p>
<p>text7</p>
<p>text8</p>
<p>text9</p>
<p>text10</p>
<p>text11</p>
<p>text12</p>
<p>text13</p>
<p>text14</p>
<p>text15</p>
<p>text16</p>
<p>text17</p>
<p>text18</p>
<p>text19</p>
<p>text20</p>
</div>
</body>
</html>
如有帮助,请点击我的回答下方的【采纳该答案】按钮帮忙采纳下,谢谢!