ubuntu 在 html 中不显示图像
ubuntu doesnt show image in html
我使用 windows 开发了一个网页,它工作正常。但是当我想使用 ubuntu 在网络上上传时,没有显示一张图片。这是 css 代码:
start-page {
position: relative;
width: 100%;
height: 100%;
z-index: 10;
background: url('../img/background/start.jpg') #c0c0c0 bottom center fixed no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
在 ubuntu 中导航到文件夹并通过以下方式授予对所有内容的所有访问权限:
chmod -R 777 .
如果这解决了问题,那么您就知道这是一个权限问题。
注意:一般来说,将所有访问权限授予所有用户是不安全的,尤其是在生产环境中。
P.S。另一种简单的方法是将您的图像上传到第三方(如亚马逊 S3),因为无论如何将您的资产托管在主服务器以外的其他地方是一种更好的做法。
我使用 windows 开发了一个网页,它工作正常。但是当我想使用 ubuntu 在网络上上传时,没有显示一张图片。这是 css 代码:
start-page {
position: relative;
width: 100%;
height: 100%;
z-index: 10;
background: url('../img/background/start.jpg') #c0c0c0 bottom center fixed no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
在 ubuntu 中导航到文件夹并通过以下方式授予对所有内容的所有访问权限:
chmod -R 777 .
如果这解决了问题,那么您就知道这是一个权限问题。
注意:一般来说,将所有访问权限授予所有用户是不安全的,尤其是在生产环境中。
P.S。另一种简单的方法是将您的图像上传到第三方(如亚马逊 S3),因为无论如何将您的资产托管在主服务器以外的其他地方是一种更好的做法。