<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
.css{
width:50px;
border:1px solid red;
/*
overflow-x:scroll;左右滚动
overflow-x:scroll;上下滚动
overflow属性: 检索或设置当对象的内容超过其指定高度及宽度时如何显示内容
overflow: auto; 在需要时内容会自动添加滚动条
overflow: scroll; 总是显示滚动条
overflow-x: hidden; 禁止横向的滚动条
overflow-y: scroll; 总是显示纵向滚动条
*/
scrollbar-face-color: #006400;/*'滚动条凸出部分的颜色*/
scrollbar-highlight-color: #FFFFFF;/*' 滚动条空白部分的颜色*/
scrollbar-shadow-color: #006400;/*滚动条立体的颜色*/
scrollbar-3dlight-color: #006400;/*滚动条亮边的颜色*/
scrollbar-arrow-color: #006400; /*'上下按钮上三角箭头的颜色*/
scrollbar-track-color: #006400; /*'滚动条的背景颜色*/
scrollbar-darkshadow-color: #006400; /*'滚动条强阴影的颜色*/ }
</style>
</head>
<body>
<div class="css">dsfsdfffffffffffffffffffffffffffffffffffffffffff</div>
<div style="width:260px;height:120px; overflow-y:scroll; border:1px solid;"> 这里是你要显示这里是你要显示的这里是你要显示这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的这里是你要显示的的的内容 </div>
</body>
</html>
html中的div添加滚动条
最新推荐文章于 2025-01-13 23:49:27 发布