【发布时间】:2020-08-31 00:56:54
【问题描述】:
我尝试使用 css 插入图像,问题是它适用于来自互联网的 http 图像,但是当我使用具有正确路径的本地图像时不起作用。
顺便说一句,我将图像放在 html 文件的同一文件夹中。 还使用可视代码中的右键单击复制路径。
这是css:
.cuerpo{
background-image:url("");
height: 100vh;
background-size: bottom;
display:flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
【问题讨论】:
-
这是我使用 C:\Users\elari\OneDrive\Documents\CacheStudioOff\img\LampPostBannercache.jpg 的路径