重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

CSS制作的三角形和圆形小按钮代码分享

这篇文章主要介绍“CSS制作的三角形和圆形小按钮代码分享”,在日常操作中,相信很多人在CSS制作的三角形和圆形小按钮代码分享问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”CSS制作的三角形和圆形小按钮代码分享”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!

创新互联建站是一家专注于成都网站制作、做网站、外贸营销网站建设与策划设计,赤峰网站建设哪家好?创新互联建站做网站,专注于网站建设10年,网设计领域的专业建站公司;建站业务涵盖:赤峰等地区。赤峰做网站价格咨询:028-86922220

参考了天猫、微博等网站的做法,用纯html和css实现,效果还是不错的。
以下是成果,兼容主流浏览器,包括ie6。
CSS制作的三角形和圆形小按钮代码分享

CSS Code复制内容到剪贴板

  1.   

  2.   

  3.   

  4.   

  5.   

  6.   

  7.   

  8.   

  9.   

  10.   

  11.   

  12. *{margin:0; padding:0; list-style:none; font:normal 12px/150% 宋体; }   

  13. body{ padding:20px; }   

  14. .arrow{ margin-bottom:20px;  }   

  15.   

  16. /* css三角形 */  

  17. .arrow,.arrow s { position:relative;  display:block; font-size: 0; line-            height: 0; width: 0; height: 0; border-color:transparent; border-style:dashed; border-width:5px; }   

  18. .arrowR,.arrowR s{ border-left-color:#aaa; border-left-style:solid; }   

  19. .arrowR s{ border-left-color:#fff; position:absolute; left:-7px; top:-5px; }   

  20. .arrowR:hover{ border-left-color:#f60;  }   

  21.   

  22. .arrowL,.arrowL s{ border-right-color:#aaa; border-right-style:solid; }   

  23. .arrowL s{ border-right-color:#fff; position:absolute; rightright:-7px; top:-5px; }   

  24. .arrowL:hover{ border-right-color:#f60;  }   

  25.   

  26. .arrowT,.arrowT s{ border-bottom-color:#aaa; border-bottom-style:solid; }   

  27. .arrowT s{ border-bottom-color:#fff; position:absolute; left:-5px; top:-3px; }   

  28. .arrowT:hover{ border-bottom-color:#f60;  }   

  29.   

  30. .arrowB,.arrowB s{ border-top-color:#aaa; border-top-style:solid; }   

  31. .arrowB s{ border-top-color:#fff; position:absolute; left:-5px; bottombottom:-3px; }   

  32. .arrowB:hover{ border-top-color:#f60;  }   

  33.   

  34. /* css圆形 */  

  35. .circle{ line-height:100%; overflow:hidden;  font-    family:Tahoma,Helvetica; font-size:18px; color:#aaa;  }   

  36. .circle:hover{ color:#f60;  }   

  37.   

  38.   

  39. /* 提示盒子 */  

  40. .tipBox{ width:200px; margin-top:10px;   }   

  41. .tipBox .hd{ height:5px;  position:relative;  }   

  42. .tipBox .hd .arrow{ position:absolute; top:-5px; left:10px; }   

  43. .tipBox .hd .arrow s{ top:-4px; }   

  44. .tipBox .bd{ border:1px solid #aaa; padding:10px;  -webkit-border-    radius:5px; -moz-border-radius:5px; border-radius:5px;  }   

  45. .tipBoxA .arrow s{ border-bottom-color:#f6f6f6;  }   

  46. .tipBoxA .bd{ background:#f6f6f6;  }   

  47.   

  48.   

  49.   

  50.   

  51.   

  52.   

  53.   

  54.   

  55.   

  56.   

  57.   

  58.   

  59. ?   

  60.   

  61.   

  62.   

  63.   

  

  •   

  • 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   

  •   

  •   

  •   

  •   

  •   

  •   

  •   

  • 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   

  •   

  •   

  •   

  •   

  •   

  • 到此,关于“CSS制作的三角形和圆形小按钮代码分享”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注创新互联网站,小编会继续努力为大家带来更多实用的文章!


    网站标题:CSS制作的三角形和圆形小按钮代码分享
    本文链接:http://cqcxhl.com/article/gcipog.html

    其他资讯

    在线咨询
    服务热线
    服务热线:028-86922220
    TOP