📝 代码查看
使用runcode.html页面

1
查看次数
2025-12-04
创建时间
2025-12-04
最后更新
 <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
  </ul>
* {
  background-color: rgba(0,0,0,0.08);
  box-shadow: inset 0 0 1px red;
}
html {
  zoom: 2;
}

ul {
  margin: 0;
  list-style-type: none;
  padding: 0;
  width: 150px;
}
ul li {
  width: 50px;
  height: 50px;
  float: left;
}

ul:has(li:nth-child(2):last-child) li,
ul:has(li:nth-child(4):last-child) li {
  width: 75px;
  height: 75px;
}

ul:has(li:nth-child(8):last-child) li {
  width: 37.5px;
  height: 37.5px;
}

ul:has(li:nth-child(5):last-child) li:nth-child(-n + 2) {
  width: 75px;
  height: 75px;
}


暂无JavaScript代码

👁️ 实时预览