这个什么问题_html/css_WEB-ITnose

WBOY
Release: 2016-06-21 09:34:41
Original
1022 people have browsed it

<div id = "top">		<span id = "logo"></span>	</div>
Copy after login


#top{	background:url(../images/top_bg.png);	width: 100%;	height: 125px;}#logo{	background:url(../images/logo.png);	width: 200px;	height:125px;}
Copy after login


为什么 logo.png不显示的


回复讨论(解决方案)

span是行内元素,不能设置width、height值,改用div即可。

在#logo中添加display:block;就OK了,因为span是内联级元素,设置width没有用,所以需要转化成块元级元素

Related labels:
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