html and css | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

html and css

b. Set the Page background to use jpg picture (use any picture). The picture should be displayed only one time in pixel position of 480, 370 (x, y respectively). In addition, the picture must not scroll with the rest of the page. how to do this in both HTML and CSS? please ..

10th Nov 2022, 8:54 AM
Zainab
Zainab - avatar
1 Answer
0
To set the page background to use a jpg picture, you can use the background-image property in CSS. To specify the position and repeat of the image, you can use the background-position and background-repeat properties. To prevent the image from scrolling with the rest of the page, you can use the background-attachment property. For example: body { background-image: url("picture.jpg"); /* use any picture */ background-position: 480px 370px; /* x and y coordinates */ background-repeat: no-repeat; /* display only once */ background-attachment: fixed; /* do not scroll with the page */ }
11th Nov 2022, 9:23 AM
Doğu Aracı