html - 为什么我没有在我的 div 中获得图像背景?
问题描述
mystyle1.css 中的以下内容在我家里的笔记本电脑上效果很好,我得到了一个带有星空背景的 div。
但是,当我将它上传到我的 GoDaddy 网页时,没有星空!
文件夹排列相同,在带有html文件的文件夹中是子文件夹css,images,mp3,php
谁能告诉我为什么这在家里有效,但在我的主机上无效?
#div-alien {
width:90%;
margin:0 auto;
/*temporary text styles below*/
text-align:center;
font-weight:bold;
font-size: 25px;
color: white;
background-image: url("../images/starrysky1.jpeg");
background-color: #cccccc;
height: 500px;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
border:3px;
border-style:solid;
border-color:#FF0000;
}
解决方案
推荐阅读
- ruby-on-rails - 如何使用 gem 移动性按区域过滤记录?
- reactjs - TypeError:无法读取 React 中未定义的属性“标题”
- java - 用于java代码编译的SVN预提交钩子
- java - 带有德语语言环境的 SimpleDateFormat 是否应该能够解析带有时区 CEST 的字符串?
- python - 在 Python 中读取直接访问二进制文件格式
- angular - JHipster - *jhiHasAnyAuthority 指令 - 在用户时显示一件事,在管理员时显示另一件事
- excel - VBA 正则表达式匹配模式
- google-apps-script - 谷歌脚本基本身份验证
- angular - bulma-steps中的按钮不起作用Angular2
- gnupg - 使用 gpg 验证文件会给出退出代码 0,即使密钥没有可信签名