久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

nth-子 CSS 選擇器

nth-Child CSS selectors(nth-子 CSS 選擇器)
本文介紹了nth-子 CSS 選擇器的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我有九組配色方案,我想將它們應用于一系列 div.使用 :nth-child(1), :nth-child(2)... 適用于前九個,但我希望之后重復該序列,但我不能圍繞 (3n+2) 表示法纏繞我的頭......我想我明白了,但我似乎無法哄它做我想做的事.

I have nine sets of color schemes that I want to apply to a sequence of divs. Using :nth-child(1), :nth-child(2)... works for the first nine, but I'd like the sequence to then repeat after that, and I can't wrap my head around the (3n+2) notation... I think I get it, but I can't seem to coax it into doing what I want.

這可能嗎,還是我應該在寫出每個 div 時只為它們應用一個類?

Is this possible, or should I just apply a class to each div as I write them out?

推薦答案

如果你的意思是你需要對每九個連續的元素應用不同的規則,你必須使用這九個選擇器:

If you mean you need to apply different rules to every nine consecutive elements, you have to use these nine selectors:

:nth-child(9n+1)
:nth-child(9n+2)
:nth-child(9n+3)
:nth-child(9n+4)
:nth-child(9n+5)
:nth-child(9n+6)
:nth-child(9n+7)
:nth-child(9n+8)
:nth-child(9n+9) /* Or :nth-child(9n) */

這篇關于nth-子 CSS 選擇器的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

CSS selector when :target empty(:target 為空時的 CSS 選擇器)
Does the CSS direct decendant (gt;) not have any value in selectivity?(CSS 直接后代 (gt;) 在選擇性方面沒有任何價值嗎?)
Using querySelectorAll(). Is the result returned by the method ordered?(使用 querySelectorAll().方法返回的結果是否有序?)
Safari bug :first-child doesn#39;t update display:block when items are removed with JS(Safari 錯誤:當使用 JS 刪除項目時,first-child 不更新 display:block)
Using same ID for multiple HTML tags?(對多個 HTML 標簽使用相同的 ID?)
CSS: Select element only if a later sibling exists(CSS:僅當存在較晚的兄弟時才選擇元素)
主站蜘蛛池模板: 久国产 | 日韩欧美国产综合 | 欧美a视频 | 午夜免费时刻 | 巨骚综合| 日韩欧美在线播放 | 国产激情一区二区三区 | 91禁蘑菇在线看 | 综合久久99| 午夜在线视频观看日韩17c | 99久久精品一区二区成人 | 日本黄色三级视频 | 国产精品黄 | 日韩精品在线一区二区 | 99在线视频观看 | 91亚洲国产成人久久精品麻豆 | 欧美成人区 | 日韩字幕 | 深夜福利免费 | 在线色网 | 美日韩一区二区三区 | 色妞色视频一区二区三区四区 | 中文字幕不卡在线观看 | 黄色av毛片 | 九九在线观看高清免费 | 欧美日韩亚洲视频 | 日韩在线免费观看视频 | 久久99精品久久久久久国产越南 | www.欧美日韩 | 国产欧美一区二区精品性色超碰 | 911精品国产一区二区在线 | 欧美第一页 | 午夜一区二区三区 | 91网站免费观看 | 中文字幕av久久爽av | 99国产精品99久久久久久 | 欧美日韩成人在线观看 | 一起操在线 | 免费一级全黄少妇性色生活片 | 黄免费网站 | 免费国产一区二区 |