首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏前端F2E

    如何正确使用:has和:nth-last-child

    .site-header:has(li:nth-last-child(n + 4)) { --layout-2: true; } 有了这个,当导航项有4个或更多时,我们设置变量--layout /* This will only works if the --layout-2 CSS variable is set */ @container style(--layout-2: true) {

    89630编辑于 2023-09-01
领券