यह CSS3 लेकिन% नहीं 100 पार ब्राउज़र (अर्थात् IE7) का उपयोग किया जा सकता है। छद्म का उपयोग करके: तत्व और काउंटर-रीसेट और काउंटर-वृद्धि से पहले आप सूची-शैली को छुपा सकते हैं और अपना स्वयं का बना सकते हैं। Styling ordered list numbers
और here एक डेमो है कि लेख से बनाया गया है:
यहाँ एक लेख रूपरेखा कैसे है।
खतरनाक लिंक रोट के मामले में
इसके अलावा - यहाँ मुख्य सीएसएस आवश्यक कोड (यह किसी भी आदेश दिया सूची में लागू किया जा सकता है)
ol {
counter-reset:li; /* Initiate a counter */
margin-left:0; /* Remove the default left margin */
padding-left:0; /* Remove the default left padding */
}
ol > li {
position:relative; /* Create a positioning context */
margin:0 0 6px 2em; /* Give each list item a left margin to make room for the numbers */
padding:4px 8px; /* Add some spacing around the content */
list-style:none; /* Disable the normal item numbering */
border-top:2px solid #666;
background:#f6f6f6;
}
ol > li:before {
content:counter(li); /* Use the counter as content */
counter-increment:li; /* Increment the counter by 1 */
/* Position and style the number */
position:absolute;
top:-2px;
left:-2em;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
box-sizing:border-box;
width:2em;
/* Some space between the number and the content in browsers that support
generated content but not positioning it (Camino 2 is one example) */
margin-right:8px;
padding:4px;
border-top:2px solid #666;
color:#fff;
background:#666;
font-weight:bold;
font-family:"Helvetica Neue", Arial, sans-serif;
text-align:center;
}
li ol,
li ul {margin-top:6px;}
ol ol li:last-child {margin-bottom:0;}
इस कोड को एक कस्टम आदेश दिया सूची का उत्पादन करेगा; यद्यपि आपने जिस शैली के लिए कहा था, उसके बावजूद। मैं आपको अनुकूलन कार्य छोड़ दूंगा :) चीयर्स
संभावित डुप्लिकेट [क्या सूची में बुलेट के रंग को बदलने का कोई आसान तरीका है?] (Http://stackoverflow.com/questions/76564/is- वहां-एक-आसान-तरीके-से-बदलने-रंग-में-बुलेट-इन-ए-लिस्ट) –
संभव नहीं है। आप स्वयं को HTML में नंबर जोड़ सकते हैं। – iambriansreed
@iambriansreed यह संभव है; बस 100% क्रॉस-संगत नहीं है। – rlemon