滚动人物悬空效果
代码语言:html
所属分类:视觉差异
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> article { max-width: 500px; margin: 2rem auto; font: 1.5rem/1.5 system-ui; } figure { padding: 0; margin: 0; position: relative; padding-bottom: 150px; } figure img { max-width: 100%; display: block; margin-bottom: 120px; } figure img.top { position: absolute; top: 115px; left: 0; } figure figcaption { border: 5px solid #009688; color: #009688; text-transform: uppercase; font-size: 3rem; line-height: 1; padding: 0.25rem; text-align: center; position: sticky; top: 0; mix-blend-mode: color-dodge; } figure figcaption strong { display: block; } figure + p { padding-top: 20px; margin-top: -280px; background: white; position: relative; } </style> </head> <body translate="no"> <article> <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Reiciendis ea animi sequi nisi nostrum voluptates voluptate velit ut, nobis ipsa doloremque neque, quod exercitationem, veniam consequuntur ratione ullam reprehenderit ex!</p> <p>Aliquid ad obcaecati laudantium consectetur architecto officiis ab voluptates consequuntur temporibus aspernatur placeat deserunt, quod nulla esse soluta similique? Eaque autem itaque, animi non ut tempore provident suscipit eligendi dolor?</p> <p>Eveniet velit illum dicta deserunt temporibus ducimus vel totam vitae nisi tenetur. Vero odio dolore eum, voluptatum sed reiciendis, assumenda placeat quod totam atque reprehenderit porro non est vel rem.</p> <figure> <figcaption> <strong>Highway</strong> Blues </figcaption> <img src='http://repo.bfw.wiki/bfwrepo/image/5e34cf440598d.png' alt='Woman holding guitar over shoulder.........完整代码请登录后点击上方下载按钮下载查看
网友评论0