Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Changing letters on button hover.

reb98

New Coder
Hi,
Bit of a strange one for you all,
I am doing a website for a client whos theme is cryptic.
For the nav bar, they are wanting the 'products' button to read 'podrctus' (letters muddled) and on hover are wanting the letters to move to the correct positioning to spell the word 'products' and then to move back to position one when not hovering.
Any ideas is muchly appreciated!
 
Are they looking for an effect where it looks like the letters move into the correct position, or is it just a simple change on hover? If it's just a simple change on hover from muddled to clear, just have two spans inside of the button with different classes, one for muddled and one for correct and hide the correct one with CSS. Then on hover show the correct span and hide the muddled one.

If they want more of a shuffling effect with the letters, that becomes more tricky, but one option would be to have a separate span for each letter, each absolutely positioned inside the button. Then on hover, the positions change to spell the word correctly. You could use a CSS transition to make it look like they are moving instead of the transition being instant.
 

New Threads

Latest posts

Buy us a coffee!

Back
Top Bottom