gpt4 book ai didi

html - 如何将css3关键帧动画应用到第一行

转载 作者:太空宇宙 更新时间:2023-11-03 22:30:01 25 4
gpt4 key购买 nike

如何将 css3 关键帧动画应用于表格的第一行。我使用了这段代码 tr:first-child td 但是 css 没有被应用到表格的第一行。我在哪里犯了错误....提出一些建议。

<table id='gridId'>
<tr>
<th>Company</th>
<th>Contact</th>
<th>Country</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Germany</td>
</tr>
<tr>
<td>Centro comercial Moctezuma</td>
<td>Francisco Chang</td>
<td>Mexico</td>
</tr>
</table>

CSS

tr:first-child td {
animation: pulse 2s infinite alternate;
}

@keyframes pulse {
0% {
background-color: Green;
}
100% {
background-color: white;
}
}

最佳答案

tr:first-child th {
animation: pulse 2s infinite alternate;
}

关于html - 如何将css3关键帧动画应用到第一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48926409/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com