css - ul ol前邊的標(biāo)記如何調(diào)整樣式呢
問題描述
遇到了這樣的情況;如果用的是bootstrap框架開發(fā)的話。請(qǐng)問:該怎么寫呢,求各位老哥提供點(diǎn)思路。(能用的話最好把bootstrap用上,用不上也行)如圖:
問題解答
回答1:https://codepen.io/HaoyCn/pen...
回答2:list-style-image 可以實(shí)現(xiàn) 圖標(biāo)字體可以實(shí)現(xiàn)
回答3:建議還是不要用list-style,最好自定義樣式,給li標(biāo)簽添加背景色,添加圓角邊,再給前三個(gè)自定義顏色
最終效果:
<style> li {list-style: none;width: 20px;text-align: center;margin: 10px 0;border-radius: 4px;color: #fff;background-color: #ccc; } .one{background-color: red; } .two{background-color: green; } .three{background-color: orange; } </style>HTML
<ul><li class='one'>1</li><li class='two'>2</li><li class='three'>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li><li>10</li> </ul>
相關(guān)文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. Apache 已經(jīng)把網(wǎng)站根目錄的改為allow from all了,但是服務(wù)器還是不能訪問?4. 配置Apache時(shí),添加對(duì)PHP的支持時(shí)語法錯(cuò)誤5. phpstudy8.1支持win11系統(tǒng)嗎?6. css - 寫頁面遇到個(gè)布局問題,求大佬們幫解答,在線等,急!~7. vue.js - Vue 如何像Angular.js watch 一樣監(jiān)聽數(shù)據(jù)變化8. javascript - nodejs關(guān)于進(jìn)程間發(fā)送句柄的一點(diǎn)疑問9. 實(shí)現(xiàn)bing搜索工具urlAPI提交10. javascript - 移動(dòng)端上不能實(shí)現(xiàn)拖拽布局嗎?

網(wǎng)公網(wǎng)安備