惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
N
News and Events Feed by Topic
P
Privacy International News Feed
The Hacker News
The Hacker News
Schneier on Security
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
Security Latest
Security Latest
L
LINUX DO - 最新话题
阮一峰的网络日志
阮一峰的网络日志
Cisco Talos Blog
Cisco Talos Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
The Cloudflare Blog
博客园 - 【当耐特】
博客园 - Franky
P
Privacy & Cybersecurity Law Blog
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
月光博客
月光博客
D
Docker
Webroot Blog
Webroot Blog
The GitHub Blog
The GitHub Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
S
Security Affairs
Martin Fowler
Martin Fowler
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Archives - TechRepublic
Security Archives - TechRepublic
Microsoft Azure Blog
Microsoft Azure Blog
C
CERT Recently Published Vulnerability Notes
B
Blog
L
Lohrmann on Cybersecurity
T
Threatpost
量子位
S
Schneier on Security
V
Visual Studio Blog
S
Securelist
T
The Exploit Database - CXSecurity.com
Scott Helme
Scott Helme
V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
I
Intezer
Stack Overflow Blog
Stack Overflow Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
小众软件
小众软件
罗磊的独立博客
雷峰网
雷峰网
Recorded Future
Recorded Future

个人技术分享

GPT指令详细资料 – 个人技术分享 php操作cookie 转换数组形式,可取某一个值 – 个人技术分享 php操作cookie字符串,替换对应值 – 个人技术分享 php 操作cookie值 – 个人技术分享 js 引入vconsole – 个人技术分享 fastadmin appendfieldlist 用法 – 个人技术分享 PHP 转到 Go – 个人技术分享 PHP使用无头浏览器如何帮助数据提取和抓取 – 个人技术分享 解决移动设备上的所有浏览器顶部都有地址栏,导致高度问题 – 个人技术分享 Python框架 Flask和Django – 区别 – 个人技术分享 PHP To Go 转型手记 – 个人技术分享
真正的50行css代码实现响应式“瀑布流”布局 – 个人技术分享
hanhanjun888 · 2024-07-10 · via 个人技术分享
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
  <title>瀑布流</title>
  <style>
    :root {--color1: #a3d9a5;--color2: #f6b93b;--color3: #38ada9;--color4: #e55039;--color5: #1e3799;--color6: #6a89cc;--color7: #f8c291;--color8: #b71540;}
    .lists .item:nth-child(odd) {background-color: var(--color1);}
    .lists .item:nth-child(even) {background-color: var(--color2);}
    .lists .item:nth-child(3n) {background-color: var(--color3);}
    .lists .item:nth-child(4n) {background-color: var(--color4);}
    .lists .item:nth-child(5n) {background-color: var(--color5);}
    .lists .item:nth-child(6n) {background-color: var(--color6);}
    .lists .item:nth-child(7n) {background-color: var(--color7);}
    .lists .item:nth-child(8n) {background-color: var(--color8);}

    .lists {width: 1200px;margin: 0 auto;column-count: 4;column-gap: 10px;transition: column-count 0.3s ease-in-out;}
    .lists .item {height: 160px;margin-bottom: 10px;break-inside: avoid;color: #000000;text-align: center;font-size: 30px;transition: height 0.3s ease-in-out;}
    /* 更多的高度和选择器组合 */
    .lists .item:nth-child(3n+1) { height: 200px; }
    .lists .item:nth-child(4n+1) { height: 250px; }
    .lists .item:nth-child(5n+1) { height: 180px; }
    .lists .item:nth-child(6n+1) { height: 280px; }
    .lists .item:nth-child(7n+1) { height: 220px; }
    .lists .item:nth-child(8n+1) { height: 300px; }
    .lists .item:nth-child(9n+1) { height: 230px; }
    .lists .item:nth-child(10n+1) { height: 260px; }
    @media (max-width: 992px) {
      .lists {width: auto;padding: 10px;box-sizing: border-box;column-count: 3;column-gap: 10px;}
      .lists .item {break-inside: avoid;width: auto;text-align: center;margin-bottom: 10px;}
      /* 在较小屏幕下适应不同的高度 */
      .lists .item:nth-child(3n+1) { height: 220px; }
      .lists .item:nth-child(4n+1) { height: 180px; }
      .lists .item:nth-child(5n+1) { height: 250px; }
      .lists .item:nth-child(6n+1) { height: 200px; }
    }
    @media (max-width: 768px) {
      .lists {width: auto;padding: 10px;box-sizing: border-box;column-count: 2;column-gap: 10px;}
      .lists .item {break-inside: avoid;width: auto;height: 200px;line-height: 200px;text-align: center;margin-bottom: 10px;}
      .lists .item:nth-child(2n+1) {height: 240px;}
      .lists .item:nth-child(3n+1) {height: 320px;}
    }
  </style>
</head>
<body>
<div class="lists"><div class="item">1</div><div class="item">2</div><div class="item">3</div><div class="item">4</div><div class="item">5</div><div class="item">6</div><div class="item">7</div><div class="item">8</div><div class="item">9</div><div class="item">10</div><div class="item">11</div><div class="item">12</div><div class="item">13</div><div class="item">14</div><div class="item">15</div><div class="item">16</div>
</div>
</body>
</html>