Hover Translation Tutorial! | Hover Translation Copy/Paste! |
Hover translation was borne from a cooperative effort between Dante and Lark. The need for this code stems from characters who speak in other languages, but players who do not. It's a fun and easy code to integrate into your HTML. Let's take a look! "Я сошла с ума.""I'm losing my mind." This code starts with a ready-made table or webpage ("Parent Element"). For the sake of this tutorial, I'll be using this simple div: See the Pen Hover Translate for Tutorial pt II by Dante (@absenceofstars) on CodePen. Now that we have our Parent Element all ready, we need to make an internal CSS code to create the "hover" effect. Here, I'll address each line of code so you understand what it means.
Inserting this bit of code before our parent element creates an internal style sheet which the page will reference. The Here's where things start to get tricky! Inside our
This line references a
This line references the same
This line indicates a specific Now that our parent element is all set up to understand different spans and ems, we can start to integrate those into our code. Since the text currently inside the parent is in my foreign language, that makes it Here's where we insert our translated text, inside a
That's it! Now, when you look at your completed table, your text will change on a hover! You can even continue the sentence outside the |
All my codes use the paragraph tag ( Insert this into your webpage or before your HTML begins: Use this for each translated phrase:
See the Pen Hover Translate for Tutorial pt III by Dante (@absenceofstars) on CodePen. |
See the Pen Hover Translate for Tutorial by Dante (@absenceofstars) on CodePen.