With multi-dimensional model as the core, let the factory digital transformation and upgrading “within reach”>>>
.hero-box{
height: 338px;
background-color: #FF00D7;
background-image: url(Exercise Files/images/hero-image.jpg);
background-size: cover;
margin: 1%;
}
When writing. CSS files, it is always in background image: URL (exercise files/images/hero image. JPG); Expected rbrace at line:30 And the background image of the box can’t be displayed, but you can see the image by placing the mouse on the line of code
Online search may be related to the lack of “}”, but the method does not work. Simply drag the picture to the desktop to find the path again
.hero-box{
height: 338px;
background-color: #FF00D7;
background-image: url(hero-image.jpg);
background-size: cover;
margin: 1%;
}
The error disappears and the background image is previewed. It may have something to do with the long path. Because I did it according to an example. The code of the example is as follows:
.hero-box {
height: 338px;
background-color: #FF00D7;
background-image: url(images/hero-image.jpg);
background-size: cover;
margin: 1%;
}
It will not display the error report
Example code and image folder together, find the path will be short
There should be a site folder to manage the code files, picture files and so on. There should be no such problem
Similar Posts:
- Setting and Research on splash of unity startup interface (logo is too large and background is fuzzy)
- [Solved] Captcha Library Error: “OSError: cannot open resource”
- attributeError: ‘NoneType’ object has no attribute ‘shape’
- python: _tkinter.TclError: couldn’t recognize data in image file
- Solutions to the channel problem of PIL PNG format
- Image data type conversion uint8 and double in MATLAB
- java.lang.RuntimeException: Canvas: trying to draw too large(203212800bytes) bitmap.
- How to Solve Docker push Error: denied: requested access to the resource is denied
- [Solved] Docker rmi Error: Error response from daemon: conflict: unable to delete 6c20ffa54f86 (must be forced) – image is being used by stopped container 6e81c0d9b6ab
- Image has dependent child images [How to Solve]