js实现类似dooo0t图片拼贴打孔工具代码
代码语言:html
所属分类:其他
代码由claude-4.6 ai生成,可能有错误,仅供参考:点击查看提示词
代码描述:类似「dooo0t」的图片拼贴打孔工具
代码标签: js 类似 dooo0t 图片 拼贴 打孔 工具 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>dooo0t · collage</title>
<style>
/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--bg: #f0ede6;
--paper: #faf8f3;
--ink: #1a1a1a;
--accent1: #e8d5c4;
--accent2: #c9dfc9;
--accent3: #d4c5e2;
--accent4: #f5c6c6;
--punch: #1a1a1a;
--shadow: rgba(0,0,0,0.18);
}
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400&family=Syne:wght@400;700;800&display=swap');
body {
background-color: var(--bg);
font-family: 'Space Mono', monospace;
color: var(--ink);
min-height: 100vh;
overflow-x: hidden;
}
/* ─── Noise Texture Overlay ─── */
body::before {
content: '';
position: fixed;
inset: 0;
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
pointer-events: none;
z-index: 9999;
opacity: 0.5;
}
/* ─── Header / Nav ─── */
header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 36px;
border-bottom: 2px solid var(--ink);
background: var(--paper);
position: sticky;
top: 0;
z-index: 100;
}
.logo {
font-family: 'Syne', sans-serif;
font-weight: 800;
font-size: 1.6rem;
letter-spacing: -1px;
display: flex;
align-items: center;
gap: 6px;
}
.logo .dot-o {
display: inline-block;
width: 20px; height: 20px;
border: 2.5px solid var(--ink);
border-radius: 50%;
position: relative;
top: 1px;
}
nav {
display: flex;
gap: 24px;
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
nav a {
text-decoration: none;
color: var(--ink);
opacity: 0.6;
transition: opacity .2s;
}
nav a:hover { opacity: 1; }
/* ─── Punch Hole Row ─── */
.punch-row {
display: flex;
gap: 0;
padding: 0 32px;
border-bottom: 1px dashed rgba(0,0,0,0.2);
height: 34px;
align-items: center;
background: var(--paper);
}
.punch {
width: 16px; height: 16px;
border-radius: 50%;
background: var(--bg);
border: 2px solid var(--ink);
margin-right: 22px;
flex-shrink: 0;
position: relative;
}
/* Inner shadow for depth */
.punch::after {
content: '';
position: absolute;
inset: 2px;
border-radius: 50%;
background: radial-gradient(circle at 35% 35%, #fff3, transparent 70%);
}
/* ─── Hero Section ─── */
.hero {
padding: 40px 36px 20px;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 24px;
align-items: start;
}
.hero-title {
font-family: 'Syne', sans-serif;
font-size: clamp(2.8rem, 6vw, 5.5rem);
font-weight: 800;
line-height: 0.92;
letter-spacing: -2px;
}
.hero-title span {
display: inline-block;
border-bottom: 5px solid var(--ink);
}
.hero-sub {
font-size: 0.72rem;
opacity: 0.55;
letter-spacing: 0.1em;
text-transform: uppercase;
margin-top: 16px;
line-height: 1.8;
}
.hero-tag-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 20px;
}
.tag {
border: 1.5px solid var(--ink);
border-radius: 100px;
padding: 4px 14px;
font-size: 0.68rem;
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
transition: background .2s, color .2s;
}
.tag:hover { background: var(--ink); color: #fff; }
/* ─── Main Collage Grid ─── */
.collage-section {
padding: 28px 36px 48px;
}
.collage-section .section-label {
font-size: 0.65rem;
letter-spacing: 0.14em;
text-transform: uppercase;
opacity: 0.4;
margin-bottom: 18px;
display: flex;
align-items: center;
gap: 10px;
}
.collage-section .section-label::after {
content: '';
flex: 1;
height: 1px;
background: currentColor;
opacity: 0.3;
}
/* Masonry-like grid */
.collage-grid {
display: grid;
grid-template-columns: repeat(12, 1fr);
grid-auto-rows: 56px;
gap: 14px;
}
/* ─── Card Base ─── */
.card {
position: relative;
border: 2px solid var(--ink);
border-radius: 4px;
overflow: visible; /* allow punch holes to overflow */
background: var(--paper);
box-shadow: 4px 4px 0 var(--ink);
transition: transform .25s cubic-bezier(.22,.68,0,1.2), box-shadow .25s;
}
.card:hover {
transform: translateY(-4px) rotate(0.4deg);
box-shadow: 7px 7px 0 var(--ink);
}
/* Punch holes on cards */
.card-punch {
position: absolute;
width: 14px; height: 14px;
border-radius: 50%;
background: var(--bg);
border: 2px solid var(--ink);
z-index: 10;
}
.card-punch.tl { top: 10px; left: 10px; }
.card-punch.tr { top: 10px; right: 10px; }
.card-punch.bl { bottom: 10px; left: 10p.........完整代码请登录后点击上方下载按钮下载查看















网友评论0