MozTW 討論區

各項 Mozilla 相關軟體與技術討論
現在的時間是 2025-08-10, 16:43

所有顯示的時間為 UTC + 8 小時





發表新文章 回覆主題  [ 3 篇文章 ] 
發表人 內容
文章發表於 : 2005-05-27, 20:29 
離線

註冊時間: 2004-10-10, 16:00
文章: 50
來自: 台南
引言回覆:
The :nth-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings before it in the document tree, for a given positive integer or zero value of n. In other words, this matches the bth child of an element after all the children have been split into groups of a elements each. For example, this allows the selectors to address every other row in a table, and could be used, for example, to alternate the color of paragraph text in a cycle of four. The a and b values must be zero, negative integers or positive integers. The index of the first child of an element is 1.

從這段定義看來 2n+1 似乎不包括第一個 child 啊?
感覺 2n-1 才是對的?
(不好意思,我的英文實在太破了)

順便問一下 :nth-of-type(an+b) 是不是只數相同名稱的標籤?


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2005-05-27, 20:46 
離線
[MozTW 版主群]
頭像

註冊時間: 2003-09-15, 03:47
文章: 1016
來自: Taiwan
W3C 寫:
for a given positive integer or zero value of n
n >= 0 :D


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.7) Gecko/20050414
 個人資料  
引用回覆  
 文章主題 :
文章發表於 : 2005-05-27, 21:01 
離線

註冊時間: 2004-10-10, 16:00
文章: 50
來自: 台南
啊……啊……
原來如此……


回頂端
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
 個人資料  
引用回覆  
顯示文章 :  排序  
發表新文章 回覆主題  [ 3 篇文章 ] 

所有顯示的時間為 UTC + 8 小時


誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 2 位訪客


不能 在這個版面發表主題
不能 在這個版面回覆主題
不能 在這個版面編輯您的文章
不能 在這個版面刪除您的文章
不能 在這個版面上傳附加檔案

搜尋:
前往 :  
Powered by phpBB® Forum Software © phpBB Group
正體中文語系由 竹貓星球 維護製作
© moztw.org, Mozilla Foundation
MozTW,Mozilla 台灣社群