X 归档 2024-05-09
Animated img carousel 🤙
Use CSS trig functions to get radius and layout images as a cylinder 🤓
Use scroll animation to rotate the cylinder 📜
:root {
--a: calc((360 / var(--total)) * 1deg);
--r: calc((var(--item-width) / sin(var(--a))) * -1);
}
Explained 👇 https://t.co/S9w6hponFp
Use CSS trig functions to get radius and layout images as a cylinder 🤓
Use scroll animation to rotate the cylinder 📜
:root {
--a: calc((360 / var(--total)) * 1deg);
--r: calc((var(--item-width) / sin(var(--a))) * -1);
}
Explained 👇 https://t.co/S9w6hponFp
动画图片轮播 🤙
用 CSS 三角函数算出半径,把图片排成一个圆柱面 🤓
用滚动动画让圆柱旋转 📜
:root {
--a: calc((360 / var(--total)) * 1deg);
--r: calc((var(--item-width) / sin(var(--a))) * -1);
}
讲解 👇 https://t.co/S9w6hponFp
用 CSS 三角函数算出半径,把图片排成一个圆柱面 🤓
用滚动动画让圆柱旋转 📜
:root {
--a: calc((360 / var(--total)) * 1deg);
--r: calc((var(--item-width) / sin(var(--a))) * -1);
}
讲解 👇 https://t.co/S9w6hponFp
