Jump to content

position fixed trick


Matej

Recommended Posts

Hello , how is possible to make similar trick as with background:url("")no-repeat fixed center?

 

What i am trying to do is to let "text" do the same effect as with this background here is a demo.

http://jsfiddle.net/Trolstover/2kvhgga0/ as you can see here , the images arent "Scrolling up" thanks to background fixed position but i want to achieve that the text will be the same.

 

Nice example is on this site i've found http://www.loono.cz/ first image with button.

 

Thanks for answers

Link to comment
Share on other sites

If you want the element to be in a particular part of the screen you would use position: fixed.

 

For example:

.menu {  position: fixed;  left: 0;  top: 0;  width: 100%;}
Link to comment
Share on other sites

Using position fixed , the element would be in the same position after scroll and so on. Im talking about achieving similar effect like

 

 

 .menu {   background:url("") no-repeat fixed center }

but with elements also and not just background.

Link to comment
Share on other sites

I'm not sure what you're trying to achieve. The example you show simply keeps the background in the same place, while using fixed position keeps the entire element in place.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...