css滚动网页实现图三维旋转切换效果代码
代码语言:html
所属分类:加载滚动
代码描述:css滚动网页实现图三维旋转切换效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Dancing+Script&display=swap"); *, *::before, *::after { padding: 0; margin: 0 auto; box-sizing: border-box; } body { font-family: "Dancing Script", cursive; background-color: #eee; height: 10000px; } ul { position: fixed; top: calc(50% - 260px); left: calc(50% - 260px); width: 520px; height: 520px; background-color: #333; perspective: 1000px; box-shadow: 0 0 20px #000 inset; } ul::before { content: "Scroll..."; position: absolute; top: -1.5em; font-size: 24px; } li { --ang: -180deg; position: absolute; bottom: 0; width: 100%; height: 100%; background-color: #fff7; display: flex; justify-content: flex-end; align-items: flex-end; padding: 48px 32px; font-size: 24px; transform: rotateY(var(--ang)); transform-style: preserve-3d; -webkit-backface-visibility: hidden; backface-visibility: hidden; } li > img { position: absolute; top: 10px; left: 10px; width: 500px; height: 500px; z-index: -2; border: 1px solid #fff; } li::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 5em; background-color: #fff7; z-index: -1; } </style> </head> <body > <ul> <li> <img src=" //repo.bfw.wiki/bfwrepo/image/60078a8d5f89d.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_400,/quality,q_90" alt="cut citrus fruits. " />Lorem Ipsum</li> <li> <img src="//repo.bfw.wiki/bfwrepo/image/60078a8d5f89d.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_400,/quality,q_90" alt="sliced mango. " />Dolor Sit</li> <li> &.........完整代码请登录后点击上方下载按钮下载查看
网友评论0