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. Feedback
  3. FadeIn images on hovering a certain class

FadeIn images on hovering a certain class

Scheduled Pinned Locked Moved Feedback
2 Posts 2 Posters 477 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.
  • M Offline
    M Offline
    MoritzMoritz
    wrote on last edited by MoritzMoritz
    #1

    Hey,

    i have a short question and i hope you guys maybe could help me out.
    I´m working on a (laytheme-based) website and i want to have an effect simiular to this website where you hover (mouseover) over text (in my case i gave the text a certain class) and an image is faded in on a selected point and faded out after leaving the text. For sure its possible to get to this using javascript but when you take a look at this example you can see that also pure css should work.

    In my case the code looks like that and i´m wondering why it´s not working:

    .trigger {cursor:pointer;}
    .trigger:hover .image{opacity:1.0;}

    .image{
    opacity: 0.0;
    z-index:-100;
    display: flex;
    max-height:50vh;
    width:auto;}

    any Ideas? Thank you a lot!

    1 Reply Last reply
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Hi @MoritzMoritz
      I can quickly explain how I would do it:

      1. List itemDisplay all the images with text next to it as projects
      2. Give the images a class and hide them with display: none;
      3. I would go for jquery to show and hide the images on hover. But I think the CSS way is also possible. So when you go for the CSS you make the images go display: block;on hover of the project.
      4. Don't forget to position the image position: fixed;that it always stays in the same place.

      This is already what you did somehow.

      Can you show us an example of your tryout?

      I know somewhere in this forum this topic came up. Maybe have a search for that as well.

      All the best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      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