i can only see the background image when accessing the HTML file directly but not when accessing it through the localhost server (i'm using Flask as framework)
This is the code of the background part:
<style>
body {
background-image: url(file:///C:/Users/LENOVO/Desktop/chatbot-in-python-master/network.jpg);
background-repeat: no-repeat;
background-size: cover;
}
</style>
CodePudding user response:
Nevermind it's because the local file system path and not a web server URL.However, recommend for me the best website to get the url without losing the quality of the image.
CodePudding user response:
The addressing method is not correct! First, try copying the image to the source folder (for convenience). Or address using dots and slashes
Example:
background-image: url(./images/network.jpg);
or similar examples you can not use of local file system path!