How To Hold Text Stationary?

Asked By 10 points N/A Posted on -
qa-featured

I want to hold the text as stationary while moving its background. Is it possible by using html.

Please provide the code for it. I believe it would bring a very passionate effect on my website.

Thanks in advance.

SHARE
Answered By 550585 points N/A #117530
qa-featured

If you want your background image in your web page to move when you scroll the page either up or down, you can use a CSS file and include this script inside:

background-attachment:scroll;

This code will make the background image of the page to move or scroll when you scroll the page. You can change the scroll value to fixed if you want to make the background image to stop scrolling and stay as it is.

This CSS script has 3 values: scroll, fixed, and inherit. Here is the script for adding an image as the background of the page:

background-image:url('smiley.gif');

The file smiley.gif should be replaced with the correct URL of the image, for example http://www.domain.com/photos/ smiley.gif.

So, with this URL you will have it as background-image:url('http://www.domain.com/photos/ smiley.gif');.

Login/Register to Answer

Related Questions