Announcement
Collapse
No announcement yet.
How to Create a Pulsating Button using CSS Animation
Collapse
X
-
You don't use it as an HTML tag but use it in a class attribute in an HTML tag.
- Top
- Translate
- Bottom
-
glennrocksvb So I added the CSS and then created a HTML module but it doesn't come out right.
This is was i put in the HTML block
Code:<center><heartbeat><a href="{register_page}"target="_blank">Register now!</a></heartbeat></center>
- Top
- Translate
- Bottom
Leave a comment:
-
- Top
- Translate
- Bottom
- Likes 3
Leave a comment:
-
This is a really clever little hack. Thanks a bunch! Looks nice on the online indicator icon.
- Top
- Translate
- Bottom
- Likes 1
Leave a comment:
-
How to Create a Pulsating Button using CSS Animation
Want buttons that grab attention like what this forum has for the Register Now button for guests?
Instructions:- Add these CSS in css_additional template in AdminCP or via Sitebuilder > Style CSS Editor.
Code:.heartbeat { -webkit-animation: pulse 1s ease infinite; -moz-animation: pulse 1s ease infinite; -ms-animation: pulse 1s ease infinite; -o-animation: pulse 1s ease infinite; animation: pulse 1s ease infinite; display: inline-block; } @-webkit-keyframes pulse { 0% { -webkit-transform: scale(1); } 25% { -webkit-transform: scale(1.1); } 50% { -webkit-transform: scale(1); } 100% { -webkit-transform: scale(1); } } @-moz-keyframes pulse { 0% { -moz-transform: scale(1); } 25% { -moz-transform: scale(1.1); } 50% { -moz-transform: scale(1); } 100% { -moz-transform: scale(1); } } @-ms-keyframes pulse { 0% { -ms-transform: scale(1); } 25% { -ms-transform: scale(1.1); } 50% { -ms-transform: scale(1); } 100% { -ms-transform: scale(1); } } @-o-keyframes pulse { 0% { -o-transform: scale(1); } 25% { -o-transform: scale(1.1); } 50% { -o-transform: scale(1); } 100% { -o-transform: scale(1); } } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
2. Add hearbeat CSS class to any button or HTML tag you want to use in HTML/Ad/PHP modules, Announcemens, Notices, etc. You can add the heartbeat CSS class to any element you want to pulsate not just to buttons.
3. If you are using this for buttons, you also need to add b-button and b-button--primary or b-button--special CSS classes to the button.
Demo:
Users Viewing This Page
Collapse
There is 1 user viewing this forum topic.
- Guest
Latest Posts
Collapse
-
by weiindIf the topic title in the thread is a large size it messes up. Same size is showing up in sidebar.Today, 05:03 AM
-
Reply to Quick Topic Moderationby glennrocksvbNice workaround darkboy245!
You can also accomplish this in a more proper way via PHP Hook using the hookFrontendContentAfterAdd hook. This...04-30-2024, 10:18 PM -
by darkboy245I'm trying to give moderators the option to quickly lock a thread & an option to change the topic's prefix while replying to a thread, this is without...04-28-2024, 10:11 AM
Leave a comment: