2005 년 Stu Nichols는 this entry이라는 게시글에 테이블을 스크롤하는 행이있는 고정 헤더를 붙였습니다.스크롤 테이블
이 작업에 대한 최신 업데이트가 있습니까? 아니면 2005 년에 Stu가 쓴 글은 여전히 최신 것으로 간주되는 것입니까?
2005 년 Stu Nichols는 this entry이라는 게시글에 테이블을 스크롤하는 행이있는 고정 헤더를 붙였습니다.스크롤 테이블
이 작업에 대한 최신 업데이트가 있습니까? 아니면 2005 년에 Stu가 쓴 글은 여전히 최신 것으로 간주되는 것입니까?
그것은 현재 존재하는 AFAIK입니다. 어떤 브라우저를 지원해야하는지에 따라 CSS를 사용하여 overflow: scroll
을 tbody 요소에 첨부 할 수 있지만 공식적으로 CSS 사양에는 없으며 반 신뢰성있게 작동합니다. 파이어 폭스는 그것을 이해하는 것, 그리고 크롬뿐만 아니라,하지만 IE는 그것을 enitrely 무시 믿습니다.
jQuery를 사용하는 경우이 작업을 수행하는 데 좋은 플러그인이 있습니다. 당신은 그것을 찾을 수 있습니다 here
당신에 대해 잘 모르겠지만 동적 인 너비 (및 높이)를 처리 할 수있는 테이블이 필요합니다. 파이어 폭스 (< = 3.6)는 이것을 매우 잘 처리 할 수 있으며 제안 된 프레임 워크 중 어느 것도 깨끗한 방식으로 처리하지 못하는 것 같습니다.
https://bugzilla.mozilla.org/show_bug.cgi?id=552080
이 문제에 투표 부담없이 파이어 폭스 사람이 자신의 descition을 재고있다 : 그들은 버그를 부르는 너무 나쁜 파이어 폭스 3.7은이 기능을 제거하고 있습니다.
나는 좋은 해결책이 있습니다! ... 당신이 이해 할 수 있다면 그것은 모든 CSS를 디스플레이에 관하여 ... 를 참조
<html>
<head>
<meta charset="UTF-8">
<title>Ex Scrollable Table</title>
<style type="text/css">
.divScroll
{
display:block;
overflow-x: hidden;
overflow-y: scroll;
-ms-overflow-x: hidden;
-ms-overflow-y: scroll;
height: 70px;
}
.Header
{
display:table-header-group;
}
.HeaderCell
{
text-align: left;
display: table-cell;
}
.FooterCell
{
display: table-cell;
text-align: left;
}
.Row
{
display:table-row;
}
.Cell
{
display: table-cell;
}
.Footer
{
display: table-footer-group;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th class="Header">
<div class="Row">
<div class="HeaderCell" style="width:140px;">Column1</div>
<div class="HeaderCell" style="width:90px;">Column2 </div>
<div class="HeaderCell" style="width:190px;">Column3</div>
<div class="HeaderCell" style="width:100px;">Column4</div>
</div>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="divScroll">
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
<div class="Row">
<div class="Cell" style="width:140px;">c1</div>
<div class="Cell" style="width:90px;">c2</div>
<div class="Cell" style="width:190px;">c3</div>
<div class="Cell" style="width:100px;">c4</div>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th class="Footer">
<div class="Row">
<div class="FooterCell" style="width:140px;">A</div>
<div class="FooterCell" style="width:90px;"> B</div>
<div class="FooterCell" style="width:190px;">C</div>
<div class="FooterCell" style="width:100px;">D</div>
</div>
</th>
</tr>
</tfoot>
</table>
</body>
</html>
을이 시도 [여기 바이올린의 (http://jsfiddle.net/PhillipSenn/ztTmv/). Carlos 감사합니다! –