|
2 | 2 | <html>
|
3 | 3 | <head>
|
4 | 4 | <style>
|
| 5 | + body { |
| 6 | + display: flex; |
| 7 | + justify-content: center; |
| 8 | + align-items: center; |
| 9 | + height: 100vh; |
| 10 | + margin: 0; |
| 11 | + } |
| 12 | + |
| 13 | + .table-container { |
| 14 | + width: 60%; |
| 15 | + position: relative; |
| 16 | + } |
| 17 | + |
5 | 18 | table {
|
6 | 19 | border-collapse: collapse;
|
7 | 20 | width: 100%;
|
8 |
| - box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); |
| 21 | + box-shadow: 0 0 10px 5px rgba(52, 152, 219, 0.7); |
9 | 22 | border-radius: 8px;
|
10 |
| - overflow: hidden; |
11 |
| - margin: 20px 0; |
12 | 23 | }
|
13 |
| - |
| 24 | + |
14 | 25 | th, td {
|
15 | 26 | padding: 15px;
|
16 | 27 | text-align: left;
|
17 |
| - transition: box-shadow 0.3s; |
| 28 | + font-family: 'Helvetica', Arial, sans-serif; |
| 29 | + font-size: 16px; |
| 30 | + line-height: 1.5; |
| 31 | + letter-spacing: 1px; |
18 | 32 | }
|
19 | 33 |
|
20 | 34 | th {
|
21 | 35 | background-color: #3498db;
|
22 | 36 | color: white;
|
23 | 37 | }
|
24 | 38 |
|
| 39 | + th:hover { |
| 40 | + color: #e74c3c; |
| 41 | + transform: scale(1.1); |
| 42 | + transition: color 0.3s, transform 0.3s; |
| 43 | + } |
| 44 | + |
25 | 45 | tr:nth-child(even) {
|
26 |
| - background-color: #f9f9f9; |
| 46 | + background-color: #f2f2f2; |
27 | 47 | }
|
28 | 48 |
|
29 | 49 | tr:nth-child(odd) {
|
30 | 50 | background-color: #e9e9e9;
|
31 | 51 | }
|
32 | 52 |
|
33 |
| - .glow:hover { |
34 |
| - box-shadow: 0 0 10px 5px rgba(52, 152, 219, 0.7); |
| 53 | + tr:hover { |
| 54 | + background-color: #3498db; |
| 55 | + color: white; |
| 56 | + transition: background-color 0.3s, color 0.3s; |
35 | 57 | }
|
36 | 58 | </style>
|
37 | 59 | </head>
|
38 | 60 | <body>
|
39 |
| - <table> |
40 |
| - <thead> |
41 |
| - <tr> |
42 |
| - <th>Header 1</th> |
43 |
| - <th>Header 2</th> |
44 |
| - <th>Header 3</th> |
45 |
| - </tr> |
46 |
| - </thead> |
47 |
| - <tbody> |
48 |
| - <tr> |
49 |
| - <td class="glow">Data 1</td> |
50 |
| - <td class="glow">Data 2</td> |
51 |
| - <td class="glow">Data 3</td> |
52 |
| - </tr> |
53 |
| - <tr> |
54 |
| - <td class="glow">Data 4</td> |
55 |
| - <td class="glow">Data 5</td> |
56 |
| - <td class="glow">Data 6</td> |
57 |
| - </tr> |
58 |
| - <tr> |
59 |
| - <td class="glow">Data 7</td> |
60 |
| - <td class="glow">Data 8</td> |
61 |
| - <td class="glow">Data 9</td> |
62 |
| - </tr> |
63 |
| - </tbody> |
64 |
| - </table> |
| 61 | + <div class="table-container"> |
| 62 | + <table> |
| 63 | + <thead> |
| 64 | + <tr> |
| 65 | + <th>Header 1</th> |
| 66 | + <th>Header 2</th> |
| 67 | + <th>Header 3</th> |
| 68 | + </tr> |
| 69 | + </thead> |
| 70 | + <tbody> |
| 71 | + <tr> |
| 72 | + <td>Data 1</td> |
| 73 | + <td>Data 2</td> |
| 74 | + <td>Data 3</td> |
| 75 | + </tr> |
| 76 | + <tr> |
| 77 | + <td>Data 4</td> |
| 78 | + <td>Data 5</td> |
| 79 | + <td>Data 6</td> |
| 80 | + </tr> |
| 81 | + <tr> |
| 82 | + <td>Data 7</td> |
| 83 | + <td>Data 8</td> |
| 84 | + <td>Data 9</td> |
| 85 | + </tr> |
| 86 | + </tbody> |
| 87 | + </table> |
| 88 | + </div> |
65 | 89 | </body>
|
66 | 90 | </html>
|
0 commit comments