본문 바로가기

Table4

[JavaScript] col 태그의 class를 tbody의 td에 동일하게 할당 col 태그의 class를 tbody의 td에도 동일하게 할당해 col 태그에서 적용할 수 없는 text-align 등을 css에서 적용하는 방법 [html] header header header header content 1 content 2 content 3 content 4 content 5 content 6 content 7 content 8 content 9 content 10 content 11 content 12 [css] table, th, td { border: 1px solid #222; } th, td { width: 100px; } .col-2 { text-align: center; } .col-3 { color: red; } [js] window.onload = function().. 2024. 3. 4.
[JavaScript] table에서 내용을 title 속성에 자동으로 추가 table 태그 내 td 안의 내용을 td의 title 속성에 자동으로 추가하여 툴팁(tooltip)으로 보여주는 방법 [html] header header header header content 1 content 2 content 3 content 4 content 5 content 6 content 7 content 8 content 9 content 10 content 11 content 12 [css] table, th, td { border: 1px solid #222; } [js] window.onload = function() { // 화면 로딩 후 실행 let tds = document.querySelectorAll('td'); // td 태그 배열로 변수에 할당 tds.forEach((i.. 2024. 1. 24.
[Tabulator] 배경색(background) / 테두리(border) / 마우스오버(mouseover) 변경 테이블 라이브러리(table library)인 타뷸레이터(Tabulator) 배경색(background) 및 테두리(boder), 마우스오버(hover) 효과 변경 방법 [html] [css] html, body { font-family: 'Roboto', sans-serif; color: #333; } .tabulator { margin: 2rem; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); } .tabulator .tabulator-header { border-bottom: none; /* header 하단 구분선 삭제 */ } .tabulator .tabulator-header .tabulator-col { background: #4.. 2023. 9. 17.
[DataTables] 배경색(background) / 테두리 (border) 변경 테이블 라이브러리(table library)인 데이터테이블(DataTables) 배경색(background) 및 테두리(boder) 변경 방법 [html] Column 1 Column 2 Row 1 Data 1 Row 1 Data 2 Row 2 Data 1 Row 2 Data 2 Row 3 Data 1 Row 3 Data 2 Row 4 Data 1 Row 4 Data 2 [css] html, body { background: #ddd; color: #333; } #myTable_wrapper .dataTables_length, #myTable_wrapper .dataTables_filter { padding-bottom: 1rem; } #myTable { border: none; /* 테이블 최하단 테두.. 2023. 9. 14.
728x90