online linked image to full body, not being shown on webpage. Although, the local image are being shown.
inspected developers tools, there was no error except,
Cross-Origin Read Blocking (CORB) blocked a cross-origin response,
"black-horse-running-on-green-field-surrounded-with-trees-101667/"
Image is not being loaded, screen is white. Expecting solution?
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
header {
background-image: url('https://www.pexels.com/photo/black-horse-running-on-green-field-surrounded-with-trees-101667/');
color: #fff;
height: 100vh;
}
<body>
<header>
<h1>Welcome to Our Website</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ut dicta consequatur quidem incidunt officia tempora.</p>
<a href="#" class="btn">Find Out More</a>
</header>
</body>
2
Answers
Lovely, It Works! Thanks for the solution [Jlair].
You are using the wrong link.
You’re using the link that goes to the web page. You need the link with only the image.
To get this link, right-click on the image and copy the image link.
Here’s what you can put in your code: