我想使它所以當我徘徊這些細胞的一個懸停在該小區當一個細胞擴展,它得到更大,和所有其他細胞得到更小(但不會消失),但我也不希望單元格擴展到表外或使表的邊界更大。試圖讓其他細胞縮小,並在表上
如何解決這個問題?
CSS代碼:
.Grid_Options {
margin-left: auto;
margin-right: auto;
margin-top: 50px;
text-align: center;
font-family: Titillium Web;
background-color: #C0C0C0;
border: 0;
}
.Grid_Options td {
width: 300px;
height: 200px;
transition: 0.5s;
font-size: 35px;
color: black;
}
.Grid_Options td:hover {
padding: 15px;
position: relative;
background-color: #686868;
color: #DDD;
}
HTML代碼:
<table class="Grid_Options" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>Placeholder</td>
<td>Placeholder</td>
</tr>
<tr>
<td>Placeholder</td>
<td>Placeholder</td>
</tr>
<tr>
<td>Placeholder</td>
<td>Placeholder</td>
</tr>
</tbody>
</table>
您可以[編輯您的問題**](https://stackoverflow.com/posts/46433002/edit)來解釋您包含的示例與您期望完成的不同之處? – Santi