Re: [問題] 請問如何在秀出的資料錄上加上不同顏色

看板Web_Design作者 (不務正業的賊)時間16年前 (2009/08/21 09:07), 編輯推噓4(401)
留言5則, 5人參與, 最新討論串5/5 (看更多)
※ 引述《fotofolio (...)》之銘言: : tbody tr:nth-child(even) {background :red } : tbody tr:nth-child(odd) {background: blue} : 收工! 這方法看起來好棒! 不過弄了一個簡單的檔案試試卻沒效果囧? 請問我是哪邊出錯了呢? <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <style TYPE="text/css"> tbody tr:nth-child(even) {background :red } tbody tr:nth-child(odd) {background: blue} </style> </head> <body> <table border="1"> <tr><td>&#9728;<td>9728 <tr><td>&#9729;<td>9729 <tr><td>&#9730;<td>9730 <tr><td>&#9731;<td>9731 (中略) </table> </body> </html> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.241.104.166

08/21 09:10, , 1F
請用這一兩年出的瀏覽器
08/21 09:10, 1F

08/21 14:31, , 2F
你有設定tbody嗎= =
08/21 14:31, 2F

08/23 09:21, , 3F
table上層應該還要有tbady 另外css3要近期的瀏覽器才支援
08/23 09:21, 3F

08/24 21:02, , 4F
IE8 似乎不支援的樣子
08/24 21:02, 4F

08/27 14:58, , 5F
<table><tbody>(中略)</tbody></table>
08/27 14:58, 5F
文章代碼(AID): #1AZVDE9W (Web_Design)
討論串 (同標題文章)
文章代碼(AID): #1AZVDE9W (Web_Design)