[英]Accordion header content
我已經用JavaScript創建了手風琴。 我想使手風琴標題內容的大小更小(50%)。 但是我無法弄清楚。
$.each(myData.offsetFormations, function(i,aut) {
headerList = '<h3><ul><li contenteditable="true">'+
'<text class="formationName">'+ aut.FormationName + '</text>'+
' | ' +
'<text class="bitSize">'+this.BitSize.toFixed(2) + '</text>'+
' | ' +
'<text class="bitType">'+this.BitType + '</text>'+
'</li></ul></h3>';
wellNameList = '<div class="table-holder"><table>';
$.each(myData.wellList, function(k,mano){
if(aut.AssociatedwellList.some(function(w) { return w.WellName === mano.WellName; }))
{
wellNameList += '<td><div>'+ mano.WellName+'</div></td>';
}
else
{
wellNameList += '<td style="color:gray;" ><div>'+ mano.WellName+'</div></td>';
}
});
wellNameList += '</table></div>';
headerList += '<div>'+wellNameList +'</div>';
$(headerList).appendTo('#accordion');
});
默認情況下, ul
元素的頂部和底部邊距為1em,這會使您的包裝盒額外增加2em的高度。
您可以使用以下方法刪除它:
.ui-accordion ul {
margin: 0;
}
更新的小提琴: http : //jsfiddle.net/xg7cr0g4/44/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.