Reputation: 14320
I want to create a sliding effect as seen in http://demos.flesler.com/jquery/scrollTo/ but with plain html and css. is that possible? if so, how?
If it is html5 and css3, no problem (I won't use IE (-: )
thanks in advance!
Upvotes: 5
Views: 15300
Reputation: 77084
See this demo:
http://tympanus.net/Tutorials/SmoothTransitionsResponsiveLayout/
And the explanation here:
http://tympanus.net/codrops/2012/06/12/css-only-responsive-layout-with-smooth-transitions/
It shows how to set up a CSS3 scrollTo transition, however, only works with the link anchors - not the scrollbar - which is a deal-breaker for me.
Upvotes: 3
Reputation: 2376
I think you can use the psuedo :target
to achieve this, quick Google search fetched this example - it gives a detailed write up on how it works on this page. I'm sure Google will bring up other results and more examples to get it working how you want it :)
Of course only certain new browsers will understand :target
but if this doesn't bother you then you have nothing to worry about.
Upvotes: 0