首页 > 开发 > CSS > 正文

CSS3+DIV实现漂亮的动画彩色标签

2024-07-11 08:25:42
字体:
来源:转载
供稿:网友

先看看效果图:

CSS Code复制内容到剪贴板
  1. <style>      
  2. .dict { margin: 20px 0;clear:both ;text-align:left;font-size:12px;}      
  3. .dict a { line-height: 24px; height: 24px; display: inline-block; background: #fff; padding: 3px 11px; margin: 10px 5px 0 0; border-radius: 8px; -moz-transition: all 0.5s; -webkit-transition: all 0.5s; -o-transition: all 0.5s; transition: all 0.5s; }      
  4. .dict a { color: #FFF;text-decoration:none }      
  5. .dict a:hover { border-radius: 0; text-shadow: #000 1px 1px 1px }      
  6. .dict .pcolor a:nth-child(8n-7) { background: #8A9B0F }      
  7. .dict .pcolor a:nth-child(8n-6) { background: #EB6841 }      
  8. .dict .pcolor a:nth-child(8n-5) { background: #3FB8AF }      
  9. .dict .pcolor a:nth-child(8n-4) { background: #FE4365 }      
  10. .dict .pcolor a:nth-child(8n-3) { background: #FC9D9A }      
  11. .dict .pcolor a:nth-child(8n-2) { background: #EDC951 }      
  12. .dict .pcolor a:nth-child(8n-1) { background: #C8C8A9 }      
  13. .dict .pcolor a:nth-child(8n) { background: #83AF9B }      
  14. .dict .pcolor a:first-child { background: #036564 }      
  15. .dict .pcolor a:last-child { background: #3299BB }      
  16. </style>      
  17. <div class="dict">      
  18.     <p class="pcolor">      
  19.         <a href="#">html</a>      
  20.         <a href="#">css3</a>      
  21.         <a href="#">网站模版</a>      
  22.         <a href="#">个人博客模版</a>      
  23.         <a href="#">扁平化</a>      
  24.         <a href="#">div+css</a>      
  25.         <a href="#">bootstrap</a>      
  26.         <a href="#">企业模版</a>      
  27.         <a href="#">古典/文化</a>      
  28.         <a href="#">婚纱摄影</a>      
  29.         <a href="#">爱情</a>      
  30.         <a href="#">jquery</a>      
  31.     </p>      
  32. </div>   
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表