2012-12-15 41 views
1

我有一個無序列表在我的HTML文件jQuery Mobile的名單沒有得到正確的樣式

<ul data-role="listview" id="mylist" data-inset="true" data-theme="c" data-dividertheme="a" > 

</ul> 

元素從JS數據庫填充列表文件

$('#mylist').append('<li><a href="#"> <h1 class="myHeader">'+item.name+'</h1><p class="myParagraph">'+item.state+'<br>'+item.zipcode+'</p></a></li>'); 

這是我做的在樣式表中

.myHeader.ui-li-heading { 
    color: #000000; 
    font-family: Helvetica; 
} 

.myParagraph.ui-li-desc { 
    color: #333; 
    overflow: show; 
    text-overflow: clip; 
    white-space: normal; 
    height: 28px; 
    margin-bottom: 0px; 
} 

問題是該列表沒有得到正確的樣式。我完全錯了嗎?什麼可能是一個解決方案?

回答