RossCH Posted May 15, 2023 Posted May 15, 2023 Hi all 🙂 Busy building a new site, and have successfully used the below code to add an arrow to all button types, and then on hover, animate the button to rotate 180 degrees. This is working for all non list buttons. ///add arrow to button, and rotate 180 on hover /// .sqs-block-button-element:after{ content: "âž”"; font-size:0.8rem; padding: 0px 10px;  vertical-align:middle;}  .sqs-block-button-element:hover::after {   -webkit-transition: 0.5s ease-in-out;   transition: 0.5s ease-in-out; -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform:rotate(180deg)}  However when I try to do the same for list buttons with the below code it isn't working. .list-item-content__button.sqs-block-button-element:after{ content: "âž”"!important; font-size:0.8rem; padding: 0px 10px;  vertical-align:middle;} .list-item-content__button.sqs-block-button-element:hover::after {   -webkit-transition: 0.5s ease-in-out;   transition: 0.5s ease-in-out; -webkit-transform: rotate(0deg); -ms-transform: rotate(0deg); transform:rotate(180deg)} I have tested that I am targeting the correct element, and just the 'after' content (that is the arrow) by using other attributes such as colour, and that works as intended. But using transition and transform I get no results... Any ideas? 🙃  Â
tuanphan Posted May 19, 2023 Posted May 19, 2023 Hi, Can you share link to page where you use list button? We can test code easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
RossCH Posted May 23, 2023 Author Posted May 23, 2023 Thanks for the reply 🙂 The client ended up cutting that list out the design so don't need to solve the issue. You're welcome to delete the thread, but it might be helpful as the code is useful for regular buttons.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment