不设置基本宽高,background-image设置的图片不会显示吗_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 08:48:55
Original
1763 people have browsed it

nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<script></script>
test







回复讨论(解决方案)

图片路径肯定是没有问题的

好吧,我知道了。一定要div里面有内容才能显示

没有宽高显示了看不到

背景图片不会撑开容器,只有容器的内容才会撑开容器,



怎么有两个结尾的div。。
div 默认类型为display:block; 宽100%,高0px

css中加上display:block或者display:inline-block就可以了

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!