Did you build those classes into your media queries to display:none ?
To Jim's point, the reason those classes work on websites is because they refer to css which applies display:none on specific media queries. You'll need to have an equivalent class in your email template to enable this functionality - if you're comfortable with code you can probably find this, but otherwise best to chat with a developer (or share your template code here).
Adding on to the above replies, you won't get it working across all email clients. Some email clients ignore media queries, some ignore <style> tags all together and only read inline style.