Jquery 使ol编号适合图标

Jquery 使ol编号适合图标,jquery,css,listview,jquery-mobile,Jquery,Css,Listview,Jquery Mobile,我正试着列一份足球运动员的名单。所以我有这个。但是,我希望将ol的编号放在图标内。问题是两位数溢出了该图标。如何解决这个问题 我的CSS是: ol { display: inline-block; } ol.ui-listview>li>.ui-btn:first-child:before, ol.ui-listview>li.ui-li-static:before, ol.ui-listview>li.ui-field-contain>label:befo

我正试着列一份足球运动员的名单。所以我有这个。但是,我希望将
ol
的编号放在图标内。问题是两位数溢出了该图标。如何解决这个问题

我的CSS是:

ol {
    display: inline-block;
}
ol.ui-listview>li>.ui-btn:first-child:before, ol.ui-listview>li.ui-li-static:before, ol.ui-listview>li.ui-field-contain>label:before, ol.ui-listview>li.ui-field-contain>.ui-controlgroup-label:before{
    content: counter(listnumbering) !important;
}

#slots {
    text-align: center;
}
试试这个css

ol {
    display: inline-block;
}
ol.ui-listview>li>.ui-btn:first-child:before, ol.ui-listview>li.ui-li-static:before, ol.ui-listview>li.ui-field-contain>label:before, ol.ui-listview>li.ui-field-contain>.ui-controlgroup-label:before{
    content: counter(listnumbering) !important;
    text-align:center;
}

#slots {
    text-align: center;
}

ol > li > a{padding-left:9px !important;}

有很多选择,在这个线程,我认为有几个适合你需要的拟合文本超过1位。如果你还没有做过的话,请看一看-@哈利,我已经看到了,上面的答案很好。但是,它会干扰jQuery mobile,导致事情崩溃!哦,好的。我会把评论留在那里,这样其他人就不会再链接它了。