有没有办法将面板栏设置为特定高度(即 300 像素),如果该特定部分太长,则使该特定部分可滚动?
问问题
2817 次
2 回答
1
假设您将面板栏定义为ul
,例如:
<ul id="panelbar">
<li class="k-state-active">
<span class="k-link k-state-selected">My Teammates</span>
<div style="padding: 10px;">
<div class="teamMate">
<img src="../../content/web/panelbar/andrew.jpg" alt="Andrew Fuller">
<h2>Andrew Fuller</h2>
<p>Team Lead</p>
</div>
<div class="teamMate">
<img src="../../content/web/panelbar/nancy.jpg" alt="Nancy Leverling">
<h2>Nancy Leverling</h2>
<p>Sales Associate</p>
</div>
<div class="teamMate">
<img src="../../content/web/panelbar/robert.jpg" alt="Robert King">
<h2>Robert King</h2>
<p>Business System Analyst</p>
</div>
</div>
</li>
<li>
Projects
...
</li>
</ul>
您应该将 CSS 样式定义为:
#panelbar {
height: 300px;
overflow-y: scroll;
}
在此处查看示例:http: //trykendoui.telerik.com/@OnaBai/ifus
于 2014-05-17T22:20:12.080 回答
0
上面的解决方案滚动整个控件。以下是滚动面板项目的方法。
于 2018-09-21T19:16:35.500 回答