0
How can I use an image as background?
Kindly tell me how to use an image as background and how to set its opacity...
3 Answers
+ 14
//css
body{
background-image: url();
}
https://www.sololearn.com/learn/CSS/1104/?ref=app
+ 3
<head>
<title>Page Title</title>
<style>
div{
height:200px;
width:200px;
background-image:url("image link");
opacity:0.5;
background-size:cover;
}
</style>
</head>
<body>
<div></div>
</body>
+ 1
body {
background-image: url("https://images.pexels.com/photos/949587/pexels-photo-949587.jpeg?cs=srgb&dl=yellow-bokeh-photo-949587.jpg&fm=jpg");
}