gl-matrix实现相册图片可任意拖拽滚动视觉差异效果代码

代码语言:html

所属分类:视觉差异

代码描述:gl-matrix实现相册图片可任意拖拽滚动视觉差异效果代码

代码标签: gl-matrix 相册 图片 任意 拖拽 滚动 视觉 差异 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css'>
  
<style>
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: #fff0
}

body {
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #000;
    touch-action: none
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    outline: none;
    cursor: grab;
    touch-action: none
}

canvas:active {
    cursor: grabbing
}

.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 20px;
    z-index: 1000;
    background: rgb(0 0 0 / .8);
    padding: 20px 40px;
    border-radius: 10px;
    font-family: monospace;
    pointer-events: none
}

.cache {
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    background-color: #000;
    z-index: 999
}

.fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgb(0 0 0 / .8);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: transform 0.2s
}

.fullscreen-btn:hover {
    transform: scale(1.1)
}

.hint {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 10;
    background: rgb(0 0 0 / .8);
    padding: 8px;
    border-radius: 8px;
    opacity: .85;
    font-size: 13px;
    color: #fff;
    pointer-events: none
}

.hint a {
    color: tomato;
    text-decoration: none;
    pointer-events: auto
}

.copy {
    position: fixed;
    top: 20px;
    left: 20px;
    top: #000;
    background: rgb(255 255 255 / .9);
    padding: 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 100;
    pointer-events: none
}

@media (max-width:768px) {
    .controls.........完整代码请登录后点击上方下载按钮下载查看

网友评论0