那麼,你真的不需要進度條吧?
你可以做的就是簡單的類添加到所選的項目,然後款式應有盡有之後相應:
li {
background:#aff; /* This is the "already done" colour. */
}
li.selected ~ li {
background:#f5f5f5; /* This is the "not yet reached" colour. */
}
li.selected {
background:#5a0; /* This is the "selected" colour. */
}
首先,你的第一li
將給予current
類。
下面是一個例子的jsfiddle:http://jsfiddle.net/KkQb3/1/
如果你再想回到另外一個你可以使用一個新類:
li {
background:#aff; /* This is the "already done" colour. */
}
li.selected ~ li {
background:#f5f5f5; /* This is the "not yet reached" colour. */
}
li.selected {
/* This is the no longer the "selected" colour. */
}
li.current {
background:#5ae; /* This is the new "selected" colour. */
}
新的jsfiddle:http://jsfiddle.net/KkQb3/2/(你可能想把名字在本例中「選擇」某種不同的東西)。
人們是否必須先完成一頁才能看到下一頁的鏈接?這是用PHP處理的嗎? – 2013-04-29 09:49:48
是的,他們必須先完成頁面,但我希望他們能夠隨時回頭。是的,它正在處理的PHP,但我不處理PHP的一部分,所以如果這是修復它的基本要求,我很擰.... – 2013-04-29 09:54:01