vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   CSS Help (https://vborg.vbsupport.ru/showthread.php?t=328633)

Irishnotsane 03-01-2021 06:27 PM

CSS Help
 
Is there a way to animate a username so that each individual letter changes colour one at a time?

For example...

At first it would be like this
Username

Then it would be
Username

Then
Username

Etc...

yilmaz 03-01-2021 07:38 PM

HTML Code:

a.username strong{
      background-image: linear-gradient(to left, violet, indigo, green, blue, yellow, orange, red);
        -webkit-background-clip: text;
        -moz-background-clip: text;
        background-clip: text;
        color: transparent;
}


Dr.CustUmz 03-01-2021 07:43 PM

Animating a gradient using a small percentage might do the trick, if this doesn't point you in the right direction and I find some time I might type something out.

--------------- Added [DATE]1614636808[/DATE] at [TIME]1614636808[/TIME] ---------------

Animations are not my thing, but this is a little closer to your desired effect. took me a whole 2 minutes to type up, and only played with the positioning for a minute before I got over it, a little fiddling I'm sure you can get it perfected how you want it.

Code:

<h1 class="username animated">DrCustUmz</h1>
Code:

.username {
    text-align: center;
    font-size: 25px;
}
.animated {
    background: linear-gradient(to right, #ff0000, #000);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: animation 15s linear infinite;
    background-size: 20%;
}

@keyframes animation {
    0%,100% {
        background-position: 10%;
    }

    99% {
        background-position: 100%;
    }
}

--------------- Added [DATE]1614637794[/DATE] at [TIME]1614637794[/TIME] ---------------

Exact effect, Figured out a way but dont thing it would be possible for a username, not easily atleast.

Code:

<div class="username">
  <span>D</span>
  <span>r</span>
  <span>C</span>
  <span>u</span>
  <span>s</span>
  <span>t</span>
  <span>U</span>
  <span>m</span>
  <span>z</span>
</div>

Code:

.username > span {
  text-transform: uppercase;
  animation: flash 2s ease-in-out infinite;
}

@keyframes flash {
  0%, 100% {
    color: #FF0000;
  }
 
  10%, 90% {
    color: #000;
  }
}

.username > span:nth-child(2) {
        animation-delay: 0.25s;
}

.username > span:nth-child(3) {
        animation-delay: 0.5s;
}

.username > span:nth-child(4) {
        animation-delay: 0.75s;
}

.username > span:nth-child(5) {
        animation-delay: 1s;
}

.username > span:nth-child(6) {
        animation-delay: 1.25s;
}

.username > span:nth-child(7) {
        animation-delay: 1.5s;
}

.username > span:nth-child(8) {
        animation-delay: 1.75s;
}

.username > span:nth-child(9) {
        animation-delay: 2s;
}


Irishnotsane 03-02-2021 06:46 PM

Thanks for the replies..

We did have the following code to enable this effect, but it seems to have stopped working?

Code:

// CHASING COLOURS START //
function donator_colordance_fly(newcolor,oldcolor,selector) {    $(selector).each(function(){          if($(this).find('.s').next().width() < 1)        {            $(this).find('.s').removeClass('s').css('color',oldcolor);            $(this).find('span').first().css('color',newcolor).addClass('s');        }else{            $(this).find('.s').removeClass('s').css('color',oldcolor)                .next().addClass('s').css('color',newcolor);        }    }); }  function donator_colordance(newcolor, oldcolor, selector) {      setInterval('donator_colordance_fly("' + newcolor + '","' + oldcolor + '","' + selector + '");',250);      $(selector).each(function(){        var letters = $(this).html().split('');        $(this).html('');        for(var i in letters)        {            if(letters[i].toString().search('unction') == -1)                $(this).append('<span>' + letters[i] + '</span>');        }    });  } 

// CHASING COLOURS END //

Then we'd have

Code:

donator_colordance('#7EB6FF','#5D8AA8','.chasingblue-donator');//blue

Irishnotsane 04-03-2021 10:34 AM

Is anyone able to do this as a span class, so it can be added to a usergroup?


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00959 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete