简单的比例函数(需要控制好页面高度、滚动条高度以及内容高度三者之间的比例关系即可)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
#contain{
position: relative;
width: 100px;
height: 300px;
border: 1px solid #000000;
overflow: hidden;