栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

一波CSS制作的三角形和圆形小按钮示例

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

参考了天猫、微博等网站的做法,用纯html和css实现,效果还是不错的。
以下是成果,兼容主流浏览器,包括ie6。
2015718181225877.png (244×427)

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.   
  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.   
  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. "arrow arrowR">   
  50. "arrow arrowL">   
  51. "arrow arrowT">   
  52. "arrow arrowB">   
  53.   
  54. "arrow arrowR">   
  55. "arrow arrowL">   
  56. "arrow arrowT">   
  57. "arrow arrowB">   
  58.   
  59. "circle">?   
  60.   
  61. "tipBox">   
  62. "hd">   
  63.   
  64.   
  65. "bd">   
  66. 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   
  67.   
  68.   
  69. "tipBox tipBoxA">   
  70. "hd">   
  71.   
  72.   
  73. "bd">   
  74. 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   
  75.   
  76.   
  77.   
  78.   
  79.   
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/216290.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号