I spruced up my HTML table a bit with some help here .
...but now I want to prevent the CSS:
tr:first-child { color: skyblue }
...from affecting row 1 in addition to row 0.
To see what I mean, see the latest update here - the "I eat tacos" line should be orange, not skyblue.
I'm happy with the latest here ; thanks all!
Add thead
to your CSS:
thead tr:first-child { color: skyblue }
EDIT: though you don't really need the first-child
and could just use thead tr
since you only have one row in your thead
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.