1

如果里面没有内容,div.deletePhone那么你需要指定高度,否则它将是0px.

#div1 ul li .deletePhone{
background-image:  url(http://localhost/TheEatTel/public/images/close.png);
background-repeat: no-repeat;
height:100px; /*some height value*/
}

那或var phone放入div.deletePhone

$("#div1 ul").append("<li><div class='deletePhone'>"+phone+"</div></li>");
4

1 回答 1

2

如果里面没有内容,div.deletePhone那么你需要指定高度,否则它将是0px.

#div1 ul li .deletePhone{
background-image:  url(http://localhost/TheEatTel/public/images/close.png);
background-repeat: no-repeat;
height:100px; /*some height value*/
}

那或var phone放入div.deletePhone

$("#div1 ul").append("<li><div class='deletePhone'>"+phone+"</div></li>");
于 2013-03-18T18:45:13.647 回答