我有一个背景里面的按钮:加载和消失
<div id="background">
<div id="button">button</div>
</div>
使用jQuery我加载其他页面的DIV。
$(function(){
$("#button").click(function() {
$("#background").load("document.html #note");
});
})
加载的DIV比背景小得多,并且它被定位在中心:
#note{
position: absolute;
top: 150px;
left: 150px;
width:200px;
height: 200px;
line-height:200px;
background-color: #eee;
}
我可以加载它,但它被加载时该按钮消失。为什么?
你拨弄不包括''
元素。如果你的按钮被包含在'fons' div中,那就可以解释它为什么会消失。 – Blazemonger