#preview { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; overflow: hidden; scrollbar-width: none; z-index: 5; } #preview-view { position: relative; width: 100%; height: 100vh; } #preview.offset #preview-view, #preview.offset #nav-controls { margin-right: clamp(250px, 30vw, 400px); } #sidebar { position: absolute; top: 0; right: 0; width: clamp(250px, 30vw, 400px); height: 100vh; background-color: rgba(40, 40, 40); color: white; overflow-x: hidden; transform: translateX(100%); scrollbar-gutter: stable; scrollbar-width: thin; } #sidebar.open { transform: translateX(0); } @media (max-width: 640px) { #sidebar { width: 100vw; transition: none; } #preview.offset #nav-controls { display: none; } } @media (min-width: 640px) { #sidebar { transition: transform .3s ease-out; } #preview-view, #nav-controls { transition: margin-right .3s ease-out; } } #sidebar-content { padding: 4em 1em 4em 1.5em; box-sizing: border-box; min-width: 250px; line-break: anywhere; } #sidebar-content a { color: aquamarine; text-decoration: none; font-size: .8em; margin: 0 .5em 0 0; } #sidebar-content a:hover { color: rgb(60, 190, 150); text-decoration: none; } #sidebar-content span::before, #sidebar-content #img-id { display: block; color: #aaa; font-size: .8em; } #sidebar-content span::after { content: ""; display: block; margin: 0 0 1.2rem 0; } #sidebar-content p { margin: 0; color: white; -webkit-user-select: text; -ms-user-select: text; user-select: text; } #preview-header { position: absolute; z-index: 10; top: 0; gap: 2em; height: 4em; width: 100%; color: white; fill: white; box-sizing: border-box; padding: .5em; display: flex; justify-content: space-between; background-image: linear-gradient(to top, transparent, hsla(0, 0%, 0%, 0.5)); align-items: center; } #image-info { overflow: hidden; text-overflow: ellipsis; min-width: 35vw; } #image-info * { height: 1.6em; white-space: nowrap; margin-left: .8em; } #image-index { font-weight: bold; } #controls { display: flex; } #controls button { min-width: 1.6rem; min-height: 1.6rem; padding: .5em; border-radius: 50%; background: none; color: white; fill: currentColor; border: none; box-sizing: content-box; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.1s ease-out; } #controls button:hover { background-color: rgba(105, 105, 105, 0.5); } #controls svg { width: 24px; height: 24px; } #image-wrapper { display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; cursor: grab; } #preview-img { width: min(90%, 90svw); height: min(90%, 90svh); object-fit: contain; transform-origin: center center; pointer-events: none; } #nav-controls { position: absolute; bottom: 0; width: 100%; display: flex; justify-content: space-between; box-sizing: border-box; z-index: 1; pointer-events: none; } #nav-controls span { width: 10vw; height: 100vh; font-size: 24px; font-weight: bold; color: grey; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; } #next-btn:hover { background-image: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.5)); } #prev-btn:hover { background-image: linear-gradient(to left, transparent, rgba(0, 0, 0, 0.5)); } #img-artwork::before { content: "作品链接" } #img-author::before { content: "作者" } #img-source::before { content: "来源" } #img-tag::before { content: "标签" } #img-info::before { content: "图片信息" } #img-source > div, #img-author > p { margin: 0 0 .5em 0; } #img-tag a, #img-info a { white-space: pre; } .desc, .time { font-size: .8em; }