让GridView产生纵向横向的滚动条。这样就不会吧页面撑打了。
- CSS code
-
<style type="text/css" id="print" media="print"> #leftSide, #footerSide { display:none; } </style> <style type="text/css" > .Freezing { position:relative ; table-layout:fixed; top:expression(this.offsetParent.scrollTop); z-index: 10; } .Freezing th{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:2px;} </style>
- HTML code
-
<div id="Div1" style="overflow: scroll; height: 140px;width:638px" > Gridview 在这里 </div>
本文介绍如何通过CSS设置GridView的滚动条,实现页面不被撑大的效果。通过定义特定样式和使用div容器限制高度与宽度,可以使得GridView在溢出时显示滚动条。
3466

被折叠的 条评论
为什么被折叠?



