有没有办法将面板栏设置为特定高度(即300px),如果特定部分太长,可以滚动它?
答案 0 :(得分: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;
}
答案 1 :(得分:0)
上面的解决方案滚动了整个控件。这是滚动面板项目的方法。