Search code examples
cssparallax

Remove parallax if screen size smaller than... css only


I am making a parallax site using http://keithclark.co.uk/articles/pure-css-parallax-websites/.

I have finished it all and looks great, but if i resize my screen window all items inside go over each other. My question now is how can i make a responsive that 'deletes' the paralax when the screen size is about an ipad size or smaller. So that i have 'normal' pages.


Solution

  • Just wrap your code with a @media query, e. g.:

    @media (min-width: 700px) {
        // your code
    }
    

    Then this code will only apply on a screen with a min-width: 700px.