我正在尝试列出足球运动员名单。因此,我有jsFiddle。但是,我希望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;
}
答案 0 :(得分:2)
试试这个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;}