반응형
<div class="container"> <table> <thead> <tr> <th>Column 1</th> <th>Column 2</th> <th>Column 3</th> <th>Column 4</th> <th>Column 5</th> </tr> </thead> <tbody> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> <td>Cell 5</td> </tr> </tbody> </table> </div>
html, body { height: 100%; } body { margin: 0; background: linear-gradient(45deg, #49a09d, #5f2c82); font-family: sans-serif; font-weight: 100; } .container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } table { width: 800px; border-collapse: collapse; overflow: hidden; box-shadow: 0 0 20px rgba(0, 0, 0, 0.1); } th, td { padding: 15px; background-color: rgba(255, 255, 255, 0.2); color: #fff; } th { text-align: left; } thead th { background-color: #55608f; } tbody tr:hover { background-color: rgba(255, 255, 255, 0.3); } tbody td { position: relative; } tbody td:hover:before { content: ""; position: absolute; left: 0; right: 0; top: -9999px; bottom: -9999px; background-color: rgba(255, 255, 255, 0.2); z-index: -1; }
https://jsfiddle.net/www_crocus_co_kr/2mpsgwdL/3/
Edit fiddle - JSFiddle - Code Playground
jsfiddle.net
<script async src="//jsfiddle.net/www_crocus_co_kr/2mpsgwdL/3/embed/js,html,css,result/dark/"></script>
반응형
'Basic > HTML & CSS' 카테고리의 다른 글
Error response 200 vs 404? (0) | 2022.10.14 |
---|---|
대시보드 제작시 참고하기 좋은 링크 모음 (0) | 2022.04.05 |
input 커서 깜빡임 없애기 (0) | 2022.01.23 |
Loading IO 를 이용한 감성 프로그래밍 (0) | 2021.10.31 |
같은 class name에 서로 다른 css 적용하기 (0) | 2021.06.28 |