AngularJS CSS 스타일로 표시하기
AngularJS CSS 스타일로 표시하기
ng-repeat 지시어는 테이블을 표시하는 데 적합합니다.
테이블에 데이터 표시
각도가있는 표를 표시하는 것은 매우 간단합니다.
CSS 스타일
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
[전체소스]
<!DOCTYPE html>
<html>
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
</body>
</html>
ng-repeat 지시어는 테이블을 표시하는 데 적합합니다.
테이블에 데이터 표시
각도가있는 표를 표시하는 것은 매우 간단합니다.
CSS 스타일
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
[전체소스]
<!DOCTYPE html>
<html>
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
</body>
</html>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 298 | CSS |
선택과집중
|
1개월 전 | 147 | |
| 297 | CSS |
선택과집중
|
3개월 전 | 351 | |
| 296 | CSS |
선택과집중
|
3개월 전 | 298 | |
| 295 | CSS |
선택과집중
|
3개월 전 | 277 | |
| 294 | CSS |
선택과집중
|
3개월 전 | 403 | |
| 293 | CSS |
선택과집중
|
4개월 전 | 339 | |
| 292 | CSS |
선택과집중
|
4개월 전 | 270 | |
| 291 | CSS |
선택과집중
|
4개월 전 | 279 | |
| 290 | CSS |
선택과집중
|
4개월 전 | 318 | |
| 289 | CSS |
선택과집중
|
4개월 전 | 294 | |
| 288 | CSS |
선택과집중
|
4개월 전 | 382 | |
| 287 | CSS |
선택과집중
|
4개월 전 | 335 | |
| 286 | CSS |
선택과집중
|
5개월 전 | 335 | |
| 285 | CSS |
선택과집중
|
5개월 전 | 352 | |
| 284 | CSS |
선택과집중
|
5개월 전 | 240 | |
| 283 | CSS |
|
2년 전 | 1511 | |
| 282 | CSS | 2년 전 | 2486 | ||
| 281 | CSS | 4년 전 | 4016 | ||
| 280 | CSS | 4년 전 | 4543 | ||
| 279 | 반응형웹 | 5년 전 | 2973 | ||
| 278 | 반응형웹 | 5년 전 | 2814 | ||
| 277 | 부트스트랩 | 7년 전 | 5016 | ||
| 276 | 부트스트랩 | 7년 전 | 6570 | ||
| 275 | 부트스트랩 | 7년 전 | 4651 | ||
| 274 | 부트스트랩 | 7년 전 | 6684 | ||
| 273 | 부트스트랩 | 7년 전 | 3353 | ||
| 272 | 부트스트랩 | 7년 전 | 3194 | ||
| 271 | 부트스트랩 | 7년 전 | 3692 | ||
| 270 | 부트스트랩 | 7년 전 | 3215 | ||
| 269 | 부트스트랩 | 7년 전 | 3086 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기