当前位置:Gxlcms > css > 用css3制作网页中常见的小箭头的方法

用css3制作网页中常见的小箭头的方法

时间:2021-07-01 10:21:17 帮助过:44人阅读

  1. /* css3三角形(向上 ▲) */
  2. p.arrow-up {
  3. width:0px;
  4. height:0px;
  5. border-left:5px solid transparent; /* 右透明 */
  6. border-right:5px solid transparent; /*右透明 */
  7. border-bottom:5px solid #2f2f2f; /* 定义底部颜色 */
  8. font-size:0px;
  9. line-height:0px;
  10. }
  11. /* css3三角形(向下 ▼) */
  12. p.arrow-down {
  13. width:0px;
  14. height:0px;
  15. border-left:5px solid transparent;
  16. border-right:5px solid transparent;
  17. border-top:5px solid #2f2f2f;
  18. font-size:0px;
  19. line-height:0px;
  20. }
  21. /* css3三角形(向左) */
  22. p.arrow-left {
  23. width:0px;
  24. height:0px;
  25. border-bottom:5px solid transparent; /* left arrow slant */
  26. border-top:5px solid transparent; /* right arrow slant */
  27. border-right:5px solid #2f2f2f; /* bottom, add background color here */
  28. font-size:0px;
  29. line-height:0px;
  30. }
  31. /* css3三角形(向右) */
  32. p.arrow-rightright {
  33. width:0px;
  34. height:0px;
  35. border-bottom:5px solid transparent; /* left arrow slant */
  36. border-top:5px solid transparent; /* right arrow slant */
  37. border-left:5px solid #2f2f2f; /* bottom, add background color here */
  38. font-size:0px;
  39. line-height:0px;
  40. }

以上就是用css3制作网页中常见的小箭头的方法的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行