xling Posted August 30, 2022 Share 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 Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 31, 2022 Solution Share 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? Link to comment Share on other sites More sharing options...
xling Posted August 31, 2022 Author Share Posted August 31, 2022 Yes it helped, thanks! Link to comment Share on other sites More sharing options...
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