Announcement

Collapse
No announcement yet.

How to Create a Pulsating Button using CSS Animation

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • glennrocksvb
    replied
    Originally posted by RUBE View Post
    I'm having a problem with the format of my post, how can you make the code (container) windows taller?
    The line breaks in the source code were removed that's why the code container is not tall enough.

    Leave a comment:


  • glennrocksvb
    replied
    You should not add HTML code in CSS! There's no instruction that says so. Put all the necessary CSS code in css_additional template in AdminCP or CSS Editor in Sitebuilder.

    ​​​Then put the HTML code for the Register button in the Notice itself. See post #11 to see what HTML code to use for the button.

    Leave a comment:


  • RUBE
    replied
    Hello Everybody,

    I really like the Sticky Default Guest Notice, but I'm having problems with the pulsating Register Now text.
    I went to css_additional.css and installed this code...

    PHP Code:
      .l-desktop .notice[data-notice-id='1'] {     positionfixed;     z-index2;     bottom0;     right0;     margin10px;     width400px;     box-shadow0px 2px 8px 2px rgba(0,0,0,0.7); } 
    Everything worked fine, so then I went back & changed the code to this...

    PHP Code:
      <a href="http://www.mywebsite.com/register/" class="b-button b-button--primary heartbeat">Register Now!</a> .l-desktop .notice[data-notice-id='1'] {     positionfixed;     z-index2;     bottom0;     right0;     margin10px;     width400px;     box-shadow0px 2px 8px 2px rgba(0,0,0,0.7);    }   .heartbeat {     -webkit-animationpulse 1s ease infinite;     -moz-animationpulse 1s ease infinite;     -ms-animationpulse 1s ease infinite;     -o-animationpulse 1s ease infinite;     animationpulse 1s ease infinite;     displayinline-block; }  @-webkit-keyframes pulse {     0% {         -webkit-transformscale(1);     }      25% {         -webkit-transformscale(1.1);     }      50% {         -webkit-transformscale(1);     }      100% {         -webkit-transformscale(1);     } }  @-moz-keyframes pulse {     0% {         -moz-transformscale(1);     }      25% {         -moz-transformscale(1.1);     }      50% {         -moz-transformscale(1);     }      100% {         -moz-transformscale(1);     } }  @-ms-keyframes pulse {     0% {         -ms-transformscale(1);     }      25% {         -ms-transformscale(1.1);     }      50% {         -ms-transformscale(1);     }      100% {         -ms-transformscale(1);     } }  @-o-keyframes pulse {     0% {         -o-transformscale(1);     }      25% {         -o-transformscale(1.1);     }      50% {         -o-transformscale(1);     }      100% {         -o-transformscale(1);     } }  @keyframes pulse {     0% {         transformscale(1);     }      50% {         transformscale(1.1);     }      100% {         transformscale(1);     } 
    Nothing happened, The floating text message was there but no pulsating button. If someone could show me where I went wrong, I would be very happy. Maybe the order I put it in is wrong? I don't think I missed any code? Oh well,,,, HELP! Please go light on me as far as explaining things, I barely know the difference between HTML and a hot meal... Like my name says - I'm a RUBE!

    Thank You for Your Time!!!!! RUBE
    Last edited by RUBE; 11-22-2017, 11:05 AM. Reason: I'm having a problem with the format of my post, how can you make the code (container) windows taller?

    Leave a comment:


  • rnedelkow
    replied
    Nice little css. I'd like to have that little pin show up in the right corner of the notice. Any chance you could share how to do this?

    Leave a comment:


  • webgeek247
    replied
    This is very simple but effective. Thanks.

    Leave a comment:


  • NumNum
    replied
    Thanks, Glenn!

    Leave a comment:


  • glennrocksvb
    replied
    Just add class="heartbeat" to the <a> tag for Join Now button after you added the CSS to css_additional template.

    Leave a comment:


  • NumNum
    replied
    If I want to make my "Join Now" button pulse [which is not a stock img], how do i link it in the html tag?

    Leave a comment:


  • glennrocksvb
    commented on 's reply
    You're welcome. Thanks for the coffee!

  • William
    replied
    Perfect, Glenn!

    Thanks,
    William

    Leave a comment:


  • glennrocksvb
    replied
    Add the "b-button" class to the button. If you want it to look like the primary button, also add "b-button--primary". There is also "b-button--special" class if you want. These are default vB5 classes to style the buttons.

    HTML Code:
    <a href="https://www.christforums.org/register/" class="b-button b-button--primary heartbeat">Register Now!</a>
    I will add this instruction to the first post.

    Leave a comment:


  • William
    replied
    Originally posted by glennrocksvb View Post
    Did you add the css in the first post to your css_additional template?
    Yes. I put the code at the very top at line 1.

    William

    Leave a comment:


  • glennrocksvb
    replied
    Did you add the css in the first post to your css_additional template?

    Leave a comment:


  • William
    replied
    I seem to have forgotten how to implement this. I added the above code to my css. And I want to add the pulsating button to my notices.

    This is what I included in my notice:

    <center><a href="https://www.christforums.org/register/" class="heartbeat">Register Now!</a></center>

    Why is this not working?

    William

    Leave a comment:


  • LarryMyster
    replied
    Originally posted by glennrocksvb View Post
    You don't use it as an HTML tag but use it in a class attribute in an HTML tag.
    I see, i got it to work. I also put a copyright down at the bottom to point people here if their interested.
    The easiest way to get free 10GB storage! Direct access to your cloud storage, with any program, without consuming any local disk space. Play music, view photos, edit documents and others directly from the cloud like you would from a local drive - from anywhere in the world.

    Leave a comment:

Users Viewing This Page

Collapse

There is 1 user viewing this forum topic.

  • Guest Guest

Latest Posts

Collapse

Working...
X
Searching...Please wait.
An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

Please push the back button and reload the previous window.'
An unexpected error was returned: 'Your submission could not be processed because the token has expired.

Please push the back button and reload the previous window.'
An internal error has occurred and the module cannot be displayed.
There are no results that meet this criteria.
Search Result for "|||"