消失的元素 [英] Disappearing Elements

查看:102
本文介绍了消失的元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我也把这个贴出来作为对另一个字符串的回复,我不明白为什么?我认为,在美丽闪烁的屏幕前面,很多时候都会花费很多时间。


当我使用display:inline;时,一件奇怪的事情正在发生。和背景:

url();我的对象(< div>你称之为对象吗?)消失了。

解决方案

Heath写道:
< blockquote class =post_quotes>当我使用display:inline时,正在发生一件奇怪的事情。和背景:
url();我的对象(< div>你称之为对象吗?)消失。




< div>是一种元素类型。它的一个特定实例被称为元素。

所以基本上,你说当你做一个< div>元素内联和

设置背景,你看不到它。


元素中是否有任何实际内容?一个未替换的内联元素

通常没有大小,除非里面有东西。如果你提供了一个测试用例的URL,它会更有帮助。


-

Jim Dabell


以下是样式标记:

#test {

身高:55px;


border:solid 1px#230;


background:transparent url(images / identity-c.jpg)no-repeat center;

显示:内联;

}


< html>

< body>

< div id =" test">< / div>

< / body>

< / html>


测试时,我在元素和背景中放了一些单词

显示,但不是我设置的大小。我开始在这里看到光明了,但我还没弄明白。


另外,如果可能,我认为安妮是离线,你能看看

中心图像的帖子,我很卡住,我真的很感激。


Jim Dabell写道:

Heath写道:

当我使用display:inline时,正在发生一件奇怪的事情。和背景:
url();我的对象(< div>你称之为对象吗?)消失。



< div>是一种元素类型。它的一个特定实例被称为元素。
所以基本上,你说当你创建一个< div>元素内联和
设置背景,你看不到它。

元素中是否有任何实际内容?一个未被替换的内联元素
通常没有大小,除非里面有东西。如果你提供了一个测试用例的URL,它会更有帮助。




Heath写道:


请将注意力转向:
http: //www.allmyfaqs.com/faq.pl?How_to_post

以下是样式标记:
#test {
高度: 55px;
显示:内联;
}




高度(和宽度)属性不适用于未替换的内联

元素。


-

David Dorward< http://dorward.me.uk/>


I also posted this as a reply to another string, I have no idea why? Too
much time infront of the pretty blinking screen I suppose.

A curious thing is happening, when I use display:inline; and background:
url(); my object(<div> do you call that an object?) disappears.

解决方案

Heath wrote:

A curious thing is happening, when I use display:inline; and background:
url(); my object(<div> do you call that an object?) disappears.



<div> is an element type. A particular instance of it is called an element.
So basically, you are saying that when you make a <div> element inline and
set a background, you can''t see it.

Is there anything actually in the element? A non-replaced inline element
doesn''t usually have a size unless there is something inside it. It would
be more helpful if you supplied a URL to a testcase.

--
Jim Dabell


Here is the mark up with Style:
#test {
height: 55px;

border: solid 1px #230;

background: transparent url(images/identity-c.jpg) no-repeat center;
display: inline;
}

<html>
<body>
<div id="test"></div>
</body>
</html>

While testing this I put some words in the element and my background
shows up, but not to the size that I set. I am starting to see the light
here, but I don''t quite have it figured out.

Also, if possible, I think Anne is offline, can you take a look at the
Centering Images post, I am quite stuck and I would really appreciate it.

Jim Dabell wrote:

Heath wrote:

A curious thing is happening, when I use display:inline; and background:
url(); my object(<div> do you call that an object?) disappears.


<div> is an element type. A particular instance of it is called an element.
So basically, you are saying that when you make a <div> element inline and
set a background, you can''t see it.

Is there anything actually in the element? A non-replaced inline element
doesn''t usually have a size unless there is something inside it. It would
be more helpful if you supplied a URL to a testcase.




Heath wrote:

Please direct your attention towards:
http://www.allmyfaqs.com/faq.pl?How_to_post

Here is the mark up with Style:
#test {
height: 55px;
display: inline;
}



The height (and width) properties do not apply to non-replaced inline
elements.

--
David Dorward <http://dorward.me.uk/>


这篇关于消失的元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆