您现在的位置是:网站首页> 编程资料编程资料

一波CSS制作的三角形和圆形小按钮示例利用CSS3实现文本框的清除按钮相关的一些效果用CSS3写的模仿iPhone中的返回按钮HTML5+CSS3实现的音量调节旋转按钮动态特效源码

2021-09-05 977人已围观

简介 这篇文章主要介绍了一波CSS制作的三角形和圆形小按钮示例,都采用了灰色的常见按钮样式设计,需要的朋友可以参考下

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

CSS Code复制内容到剪贴板
  1. "-//W3C//DTD XHTML 1.0 Strict//EN"             "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   
  2. "http://www.w3.org/1999/xhtml">   
  3.   
  4.   
  5. "Content-Type" content="text/html; charset=utf-8" />   
  6. "Content-Language" content="zh-CN" />   
  7. "Keywords" content="" />   
  8. "Description" content="" />   
  9.   
  10.   
  11. "text/css">   
  12. *{margin:0; padding:0; list-style:nonefont:normal 12px/150% 宋体; }   
  13. body{ padding:20px; }   
  14. .arrow{ margin-bottom:20px;  }   
  15.   
  16. /* css三角形 */  
  17. .arrow,.arrow s { position:relative;  display:blockfont-size: 0; line-            height: 0; width: 0; height: 0; border-color:transparentborder-style:dashedborder-width:5px; }   
  18. .arrowR,.arrowR s{ border-left-color:#aaaborder-left-style:solid; }   
  19. .arrowR s{ border-left-color:#fffposition:absoluteleft:-7pxtop:-5px; }   
  20. .arrowR:hover{ border-left-color:#f60;  }   
  21.   
  22. .arrowL,.arrowL s{ border-right-color:#aaaborder-right-style:solid; }   
  23. .arrowL s{ border-right-color:#fffposition:absoluterightright:-7pxtop:-5px; }   
  24. .arrowL:hover{ border-right-color:#f60;  }   
  25.   
  26. .arrowT,.arrowT s{ border-bottom-color:#aaaborder-bottom-style:solid; }   
  27. .arrowT s{ border-bottom-color:#fffposition:absoluteleft:-5pxtop:-3px; }   
  28. .arrowT:hover{ border-bottom-color:#f60;  }   
  29.   
  30. .arrowB,.arrowB s{ border-top-color:#aaaborder-top-style:solid; }   
  31. .arrowB s{ border-top-color:#fffposition:absoluteleft:-5pxbottombottom:-3px; }   
  32. .arrowB:hover{ border-top-color:#f60;  }   
  33.   
  34. /* css圆形 */  
  35. .circleline-height:100%; overflow:hidden;  font-    family:Tahoma,Helveticafont-size:18pxcolor:#aaa;  }   
  36. .circle:hover{ color:#f60;  }   
  37.   
  38.   
  39. /* 提示盒子 */  
  40. .tipBox{ width:200pxmargin-top:10px;   }   
  41. .tipBox .hd{ height:5px;  position:relative;  }   
  42. .tipBox .hd .arrow{ position:absolutetop:-5pxleft:10px; }   
  43. .tipBox .hd .arrow s{ top:-4px; }   
  44. .tipBox .bd{ border:1px solid #aaapadding:10px;  -webkit-border-    radius:5px; -moz-border-radius:5pxborder-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. "arrow arrowT">   
  
  • "bd">   
  • 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   
  •   
  •   
  • "tipBox tipBoxA">   
  • "hd">   
  • "arrow arrowT">   
  •   
  • "bd">   
  • 用css做的提示盒子,上三角是纯css,盒子圆角用到css3   
  •   
  •   
  •   
  •   
  •   
  • 提示: 本文由整理自网络,如有侵权请联系本站删除!
    本站声明:
    1、本站所有资源均来源于互联网,不保证100%完整、不提供任何技术支持;
    2、本站所发布的文章以及附件仅限用于学习和研究目的;不得将用于商业或者非法用途;否则由此产生的法律后果,本站概不负责!

    上一篇:详细解读CSS中的伪类afterCSS Transition通过改变Height实现展开收起元素从QQtabBar看css命名规范BEM的详细介绍css实现两栏布局,左侧固定宽,右侧自适应的多种方法CSS 实现Chrome标签栏的技巧CSS实现两列布局的N种方法CSS实现隐藏搜索框功能(动画正反向序列)CSS3中Animation实现简单的手指点击动画的示例详解CSS中的特指度和层叠问题详解overflow:hidden的作用(溢出隐藏、清除浮动、解决外边距塌陷)关于CSS浮动与取消浮动的问题

    下一篇:深入理解CSS中选择器的逻辑处理

    相关内容

    -六神源码网