테스트 사이트 - 개발 중인 베타 버전입니다

반응 형 테이블

· 8년 전 · 2469
7.JPG
반응 형 테이블

이 .table-responsive클래스는 반응 형 테이블을 생성합니다. 그러면 테이블이 작은 장치 (768px 미만)에서 가로로 스크롤됩니다. 768px 너비보다 큰 것을 볼 때 차이점은 없습니다.


<div class="table-responsive">
<table class="table">
...
</table>
</div>


<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
<h2>Table</h2>
<p>The .table-responsive class creates a responsive table which will scroll horizontally on small devices (under 768px). When viewing on anything larger than 768px wide, there is no difference:</p>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
<th>City</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Anna</td>
<td>Pitt</td>
<td>35</td>
<td>New York</td>
<td>USA</td>
</tr>
</tbody>
</table>
</div>
</div>

</body>
</html>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

게시글 목록

번호 제목
1418
부트스트랩 애니메이션 경고
1417
부트스트랩 경고 닫기
1416
부트스트랩 알림 링크
1414
1413
1412
1411
1410
부트스트랩 이미지 갤러리
1409
부트스트랩 반응 형 이미지
1408
1407
1406
1405
1404
부트스트랩 문맥 분류
1403
부트스트랩 요약 표
1402
부트스트랩 호버 행
1401
부트스트랩 테두리가있는 표
1400
1399
1398
1397
1396
1395
1394
부트스트랩 <blockquote>
1393
부트스트랩 <abbr>
1392
부트스트랩 <mark>
1391
부트스트랩 <small>
1390
1389
1388
부트스트랩 3 개의 동일한 열