可以使用如下代(dai)碼來實(shi)現:
標簽
剩余文字
需要根(gen)據自己的需求來(lai)定義(yi)標簽(qian)的樣式。例如,可以在CSS中設置以下(xia)規(gui)則(ze)來(lai)定義(yi)標簽(qian)的樣式:
.tag {
background-color: #ccc;
color: #fff;
padding: 5px;
border-radius: 5px;
font-size: 14px;
display: inline-block;
margin-right: 10px;
}
這會將標簽的(de)背景(jing)色(se)設(she)置(zhi)為灰(hui)色(se),文字顏色(se)設(she)置(zhi)為白色(se),設(she)置(zhi)圓角邊(bian)框(kuang)、字體大小和內邊(bian)距(ju),然(ran)后(hou)將其顯示(shi)為行內塊元(yuan)素,并(bing)在每個(ge)標簽后(hou)添加10個(ge)像素的(de)右邊(bian)距(ju)。
給我們留言