Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-01-2021, 06:27 PM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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...
Reply With Quote
  #2  
Old 03-01-2021, 07:38 PM
yilmaz's Avatar
yilmaz yilmaz is offline
 
Join Date: Sep 2004
Posts: 751
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
  #3  
Old 03-01-2021, 07:43 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;
}
Reply With Quote
Благодарность от:
Irishnotsane
  #4  
Old 03-02-2021, 06:46 PM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 04-03-2021, 10:34 AM
Irishnotsane Irishnotsane is offline
 
Join Date: Apr 2012
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:17 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04229 seconds
  • Memory Usage 2,214KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete