Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Mouse hover effect italic

Mouse hover effect italic

Scheduled Pinned Locked Moved General Discussion
13 Posts 7 Posters 977 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chrsgrbr
    wrote on last edited by
    #2

    Hi Stefan,

    you’ll have to use some custom css. If you use

    a:hover {
    font-style: italic;
    }

    all of your links will turn italic once your mouse hovers over them.

    Best wishes
    Christian

    1 Reply Last reply
    0
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by
      #3
      @chrsgrbr

      Thanks Christian! 👍⭐️

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stefanstraeter
        wrote on last edited by
        #4

        Perfect! It is working :) Love that effect!

        1 Reply Last reply
        1
        • daniD Offline
          daniD Offline
          dani
          wrote on last edited by
          #5

          Try it with

          transition: all 200ms;

          :D

          https://danielcampbell.ca

          1 Reply Last reply
          0
          • RichardR Offline
            RichardR Offline
            Richard
            Global Moderator
            wrote on last edited by
            #6

            Thanks @dani ! 👍

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Wynz
              wrote on last edited by
              #7

              Hey,
              The probleme with the code above is, that the software just shifting the letters to the side, which makes the letters look weird. Fonts normally have specific italics which are drawn manually individually.

              So in this case, I just want to change a font to another font when hovering. I have a specific Webfont uploaded when hovering above text.
              What's the CSS Code for that?

              Best
              Wynz

              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote on last edited by
                #8

                i think its best if you use a font that is a "variable font"

                one of the axis of the font should be italics, and then you just need to find the css that changes that axis, and then change that on hover

                for example here: https://v-fonts.com/

                there is a font:
                Screenshot 2023-11-13 at 16.37.03.png

                it has the italics axis. this value can have different values and is set via css, thus it can be changed on .yourselector:hover {}

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  Wynz
                  wrote on last edited by Wynz
                  #9

                  Variable it no option at the moment. But isn't it possible to change a font easily when hovering over another one?
                  Like changing a font from HELVETICA to TIMES NEW ROMAN when hovering above it (extreme example) …

                  I feel like the code above is really simple and something similar will work, but I have no clue what the code will look like.

                  Something like:
                  a:hover {
                  font: Times New Roman;
                  }

                  1 Reply Last reply
                  0
                  • arminunruhA Offline
                    arminunruhA Offline
                    arminunruh
                    Global Moderator
                    wrote on last edited by
                    #10

                    yea you can just change the font family on hover, sure
                    but it won't give you a transition animation

                    1 Reply Last reply
                    0
                    • W Offline
                      W Offline
                      Wynz
                      wrote on last edited by
                      #11

                      But what would the CSS-Code be for that? Might me really simple solution, but I haven't found anything …

                      1 Reply Last reply
                      0
                      • panteleyP Offline
                        panteleyP Offline
                        panteley
                        wrote on last edited by
                        #12

                        a:hover {
                        font-family: [the name of the font in italic];
                        }

                        Not sure if it will work, but try it out.

                        W 1 Reply Last reply
                        2
                        • panteleyP panteley

                          a:hover {
                          font-family: [the name of the font in italic];
                          }

                          Not sure if it will work, but try it out.

                          W Offline
                          W Offline
                          Wynz
                          wrote on last edited by Wynz
                          #13

                          @panteley Well that was easy … THX haha – Was trying it with "font" etc.

                          1 Reply Last reply
                          1
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          I also code custom websites or custom Lay features.
                          💿 Email me here: 💿
                          info@laytheme.com

                          Before you post:
                          1. When using a WordPress Cache plugin, disable it or clear your cache.
                          2. Update Lay Theme and all Lay Theme Addons
                          3. Disable all Plugins
                          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                          This often solves issues you might run into

                          When you post:
                          1. Post a link to where the problem is
                          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                          Online Users
                          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                          laytheme.com
                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Search