css实现层叠堆叠相册相框效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现层叠堆叠相册相框效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap"); *, *:after, *:before { box-sizing: border-box; } body { font-family: "Inter", sans-serif; line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background-color: #fefefe; } img { display: block; max-width: 100%; } .stack { width: 85%; max-width: 400px; transition: 0.25s ease; } .stack:hover { transform: rotate(5deg); } .stack:hover .card:before { transform: translatey(-2%) rotate(-4deg); } .stack:hover .card:after { transform: translatey(2%) rotate(4deg); } .card { aspect-ratio: 3/2; border: 4px solid; background-color: #FFF; position: relative; transition: 0.15s ease; cursor: pointer; padding: 5% 5% 15% 5%; } .card:before, .card:after { content: ""; display: block; position: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0