html - 最新版本的 chrome 中的 css 无效

标签 html css

<分区>


关闭 7 年前

我正在编写网站代码并尝试制作背景图片,但该图片无法显示。任何想法都会有所帮助

nav{
background-image: url("/top-Bar.png") 0 0 no-repeat;
height: 100%;
width: 100%;
}

最佳答案

你在使用background-image,而你应该使用background:

nav{
  background: url("/top-Bar.png") 0 0 no-repeat;
  height: 100%;
  width: 100%;
}

编辑:以上假定您的图片路径当然是正确的。

关于html - 最新版本的 chrome 中的 css 无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34317949/

上一篇:javascript - 如何在 CSS 中创建箭头(3 行)?

下一篇:javascript - 使用重(超过 400kb)svg 作为动画背景(使用 css3)

相关文章:

python - 如何在基于类的 View (模板 View )中进行多个模型查询

html - 如何使用盒子? HTML 样式

javascript - $(window).height() : works if division doesn't work if subtraction 上的 jQuery 数学运算

html - 如何调整换行标签?

javascript - 根据 slider 值增加圆的半径

html - 响应式 - 奇怪的菜单

html - 当 flexbox 元素以列模式包装时,容器不会增加其宽度

html - Bootstrap 元素在大屏幕上拉伸(stretch)

html - 使用 div 类访问 div>ul>li

CSS 过渡添加