css实现下拉滚动相片堆叠动画效果代码
代码语言:html
所属分类:加载滚动
代码描述:css实现下拉滚动相片堆叠动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background: #020520; perspective: 500px; overflow-x: hidden; } figure { position: -webkit-sticky; position: sticky; top: 0; display: flex; align-items: center; justify-content: center; width: 100vw; height: 100vh; } figure:nth-child(1) img { transform: scale(0.6) rotate(-12.5deg); } figure:nth-child(2) img { transform: scale(0.6) rotate(-9.7222222222deg); } figure:nth-child(3) img { transform: scale(0.6) rotate(-6.9444444444deg); } figure:nth-child(4) img { transform: scale(0.6) rotate(-4.1666666667deg); } figure:nth-child(5) img { transform: scale(0.6) rotate(-1.3888888889deg); } figure:nth-child(6) img { transform: scale(0.6) rotate(1.3888888889deg); } figure:nth-child(7) img { transform: scale(0.6) rotate(4.1666666667deg); } figure:nth-child(8) img { transform: scale(0.6) rotate(6.9444444444deg); } figure:nth-child(9) img { transform: scale(0.6) rotate(9.7222222222deg); } figure:nth-child(10) img { transform: scale(0.6) rotate(12.5deg); } figure img { width: 100vmin; height: 100vmin; border-radius: 3px; background: rgba(255, 255, 255, 0.25); } figure figcaption { position: absolute; top: 0.5em; left: 0.5em; } figure figcaption p { font: caption; color: whitesmoke; padding: 0.5em 1em; border-radius: 2.........完整代码请登录后点击上方下载按钮下载查看
网友评论0