Can anybody help me change this Anki code a little?

ruby rt { visibility: hidden; } ruby:hover rt { visibility: visible; }

.card1 { background-color: #FFFFFF; }

.card2 { background-color: #FFFFFF; }

​

I’m using this to hide furigana and it shows when I over over the word. The thing is I want this to work only on the front side of the card. Thank you in advance.

3 comments
  1. probably better off on /r/learnprogramming

    if there’s a primary tag on front or back of the card that distinguishes then something to the effect of

    .front ruby {….}

    .back ruby {….}

    could work. dunno specifics of anki.

  2. `.card1` and `.card2` are custom classes so no idea what they refer to (although it seems to be unrelated to ruby)

    Otherwise that should already work on both sides, there’s nothing restricting it to the back

  3. Example code from my anki deck’s card:

    `<div class=”expression”>{{front}}</div>`

    Now, if I wanted to add code that would make the text **always** visible without messing up any other styles, I would add a new class to the component which contains the text:

    `<div class=”expression newClass”>{{front}}</div>`

    After that, all you need to do is go to the Styling tab and add this code at the very end:

    `.newClass {`

    `visibility: visible;`

    `}`

Leave a Reply
You May Also Like