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 590495 points N/A #117530

How to hold text stationary?

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 https://www.dummies.com/web-design-development/html5-and-css3/how-to-register-a-domain-name-for-your-html5-and-css3-site/ smiley.gif.

So, with this URL you will have it as background-image:url('http://www.dummies.com/web-design-development/html5-and-css3/how-to-register-a-domain-name-for-your-html5-and-css3-site/ smiley.gif');.

Related Questions