+ 2
Why my background-repeat property is not working?
I want to use the opacity property too... So please tell me a solution where I can repeat the background image and can adjust the opacity of the image. If I use background-image property I could not select the image to set the opacity of that image. So I need a proper solution https://code.sololearn.com/Wj8f9fVdstMA/?ref=app
4 Antworten
+ 3
Pooja Sahoo
Background-repeat works only if your code uses background-image for the particular tag.
and <img> tag is only to insert image not to set background.
Background image can be set by writing following code in css file:
tag_name {
background-image: url(“URL“);
}
your code should be like this:
https://code.sololearn.com/WUWZ0ClwdRbQ/?ref=app
+ 2
I would recommend to just put the image as a background-image in the css for the body. Then it is working, you can leave out the img tag in html.
Just put in the body css:
body {
background-image: url(“yoururl“);
}
+ 2
But I can not use opacity in background-image:url();
+ 1
Pooja Sahoo I've edited the code if you need any further changes please notify about that