Coder Social home page Coder Social logo

Comments (5)

dirkgroenen avatar dirkgroenen commented on July 17, 2024

Hmm sounds a bit weird and I'm not sure if I understand you correctly, but I'm giving it a shot.

  • Could it be possible that the hidden elements move some other elements up which make them appear in the viewport on window load?
  • Could it be possible that before you add the hidden class the elements are visible in the viewport and therefore getting a class from the checker?

In both scenarios we're talking about milliseconds work.

from viewport-checker.

dsiglin avatar dsiglin commented on July 17, 2024

If div has class that has "display: block" or "display" anything other than "none" it will only show after entering the viewport. If div has class that has "display: none" it loads immediately. You can see the problem here:
http://www.davidsiglinphotography.com/Test/

Scroll down one page to the Lifestyle section. Notice that "Lifestyle & Portrait" fades in while the paragraph below does not. That's because the paragraph below fades in immediately on website load. The paragraph below "Lifestyle & Portrait" has the property "display: none" which then gets overridden when the class "visible" is applied.

from viewport-checker.

dewdot avatar dewdot commented on July 17, 2024

I use opacity: 0 to hide elements.

from viewport-checker.

lunbel1203 avatar lunbel1203 commented on July 17, 2024

i have this problem, not exist a solution?

from viewport-checker.

dirkgroenen avatar dirkgroenen commented on July 17, 2024

I'm closing this issue due to inactivity (from my side, apologies). Please comment if this issue is still relevant so I can re-open and investigate it.

from viewport-checker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.