最佳答案
正如 Jordi 所解释的,使用一些非常基本的 CSS 非常容易。
.label{padding: 5px 10px; color: #fff;}
.red{background-color: #da4453}
.blue{background-color: #3bafda;}
<span class="label red">red label</span>
<span class="label blue">blue label</span>
如果您想使用预定义的东西,可以使用 Bootstrap、Foundation 和其他一些框架,但如果您只想完成这些,那就太过分了。
Bootflat 有很好的配色方案 - http://bootflat.github.io/documentation.html
关于html - 如何获得彩色输入标签?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51583457/