文字显示长度固定,多余内容通过箭头上下移动效果
像上图这种效果,如何做,搜索了一下,没有找到解决方案。
------解决方案--------------------<!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>
<title> new document </title>
<style type="text/css">
#aa {
width: 514px; height: 80px;
overflow: hidden;
}
</style>
</head>
<body>
<div id="aa">
aaaaaaaaaaaaaaaaa<br />
vvvvvvvvvvvvvvvvvvvvvv<br />
nnnnnnnnnnnnnnnn<br />
hhhhhhhhhhhhhhhhhh<br />
rrrrrrrrrrrrrrrrrrrrrrrrrr<br />
ggggggggggggggggggggggggggg<br />
jjjjjjjjjjjjjjjjjjjjjjjjjj<br />
jjjjjjjjjjjjjjjjjjjjjj<br />
iiiiiiiiiiiiiiiiiiii<br />
</div>
<input type="button" value="上" onclick="document.getElementById('aa').scrollTop-=10" />
<input type="button" value="下" onclick="document.getElementById('aa').scrollTop+=10" />
</body>
</html>