xling Posted August 30, 2022 Posted August 30, 2022 Hi! Is it possible to use rem or em units to create snap points? I'm trying to create a carousel that always snaps the nearest card to the center, but the cards uses rem units instead of px. This carousel starts with a center card and can be dragged left/right. Thank you for any clarifications! See the Pen LYdwJKK by xling (@xling) on CodePen.
Solution GreenSock Posted August 31, 2022 Solution Posted August 31, 2022 No, you can't use rem but you can just convert it to px: See the Pen poVzzeK by GreenSock (@GreenSock) on CodePen. Does that help?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now