div+css实现拖动打开卷宗画作效果代码
代码语言:html
所属分类:拖放
代码描述:div+css实现拖动打开卷宗画作效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } ::-webkit-resizer { border: 1px solid black; border-radius: 50%; background: #9c874c; box-shadow: 2px 2px 2px black inset; } body { margin: 0; width: 100vw; min-height: 100vh; font-family: "Unifraktur Cook", cursive, sans-serif; } .container { overflow: hidden; width: 100%; height: 100%; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; background: black; padding: 40px 0; } .container:before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-image: url("//repo.bfw.wiki/bfwrepo/images/juanzong/istockphoto-482457846-612x612.jpg"); opacity: 0.35; background-position: center; } .title { height: 80px; box-shadow: 0px 0px 7px -2px rgba(0, 0, 0, 0.24) inset; overflow: hidden; resize: horizontal; max-width: 500px; min-width: 180px; border-radius: 10px 2px 10px 2px; container-type: inline-size; container-name: title; margin-bottom: 15px; } .title:after, .title:before { content: ""; position: absolute; width: 40px; height: 100%; top: 0; filter: brightness(0.75); z-index: 2; } .title:before { right: 0; box-shadow: -2px -1px 7px rgba(0, 0, 0, 0.35), 0px 0px 100px 30px rgba(0, 0, 0, 0.05), -20px 27px 60px 20px rgba(199, 186, 153, 0.2), 0 0 24px rgba(205, 138, 71, 0.2) inset; } .title:after { left: 0; box-shadow: 2px -1px 7px rgba(0, 0, 0, 0.35), 0px 0px 100px 30px rgba(0, 0, 0, 0.05), 20px 27px 60px 20px rgba(199, 186, 153, 0.2), 0 0 24px rgba(205, 138, 71, 0.2) inset; } .title-container { position: absolute; width: calc(100% - 80px); top: 0; left: 40px; right: 40px; height: 100%; display: flex; justify-content: center; z-index: 1; } .title-inner { font-size: 33px; width: 100%; display: flex; align-items: center; justify-content: center; background-position: center; background-image: url("//repo.bfw.wiki/bfwrepo/images/juanzong/texture.png"); z-index: 1; overflow: hidden; } .title-inner div { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 270px; filter: contrast(0.45); transition: 0.32s; width: 100%; padding: 20px; opacity: 0.94; } @container title (max-width: 310px) { .title-inner div { opacity: 0.25; transform: scale(0.75); transition: 0.24s; } } .title-space { width: 10px; } .title-roll-left { left: 0; right: 0; transform: translate(-50%); } .title-roll-right { right: -100%; transform: translate(-50%) scale(-1); } .painting { height: 600px; width: 800px; background-image: url("//repo.bfw.wiki/bfwrepo/images/juanzong/texture-painting-bg.png"); position: relative; border-radius: 8px; } .painting .painting-roll { right: 0; width: calc(100% - 20px); transform: translate(-50%); } .painting .part { position: absolute; height: 200px; width: 800px; left: 0; resize: horizontal; overflow: hidden; max-width: 800px; min-width: 70px; container-type: inline-size; } .painting .part:before, .painting .part:after { content: ""; position: absolute; width: 40px; height: 100%; left: 0; top: 0; } .painting .part:before { box-shadow: 2px -1px 7px rgba(0, 0, 0, 0.35), 0px 0px 100px 30px rgba(0, 0, 0, 0.05), 20px 27px 60px 20px rgba(199, 186, 153, 0.2), 0 0 24px rgba(205, 138, 71, 0.2) inset; filter: brightness(0.75); z-index: 1; } .painting .part:after { box-shadow: 0px 4px 2px #644843 inset, 0px -6px 8px #34292747 inset, 0px 6px 8px.........完整代码请登录后点击上方下载按钮下载查看
网友评论0