标签/分类 "Hexo" 下的文章
博客加入漂亮的标签
漂亮的标签展示 1. html代码 <div class="dict"> <p class="pcolor"> <% site.tags.forEach(function(tag) { %> <a href="<%= tag.link %>" style="text-decoration: none"> <%=tag.name %> </a> <% }); %> </p> </div> 2. CSS 代码 .dict {clear:both ;text-align:left;font-size:12px;} .dict a { line-height: 24px; display: inline-block; background: #fff; padding: 2px 11px; margin: 3px 3px 3px 0; border-radius: 5px; -moz-transition: all 0.5s; -webkit-transition: all 0.5s; -o-transition: all 0.5s; transition: all 0.5s; } .dict a { color: #FFF;text-decoration:none } .dict a:hover { border-radius: 0; text-shadow: #000 1px 1px 1px } .dict .pcolor a:nth-child(8n-7) { background: #8A9B0F } .dict .pcolor a:nth-child(8n-6) { background: #EB6841 } .dict .pcolor a:nth-child(8n-5) { background: #3FB8AF } .dict .pcolor a:nth-child(8n-4) { background: #FE4365 }