`

css制作button 带有滤镜效果

阅读更多
 .btn   {   
    BORDER-RIGHT:   #7b9ebd   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7b9ebd   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#cecfde);   BORDER-LEFT:   #7b9ebd   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7b9ebd   1px   solid   
  }   
  .btn1_mouseout   {   
    BORDER-RIGHT:   #7EBF4F   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7EBF4F   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#B3D997);   BORDER-LEFT:   #7EBF4F   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7EBF4F   1px   solid   
  }   
  .btn1_mouseover   {   
    BORDER-RIGHT:   #7EBF4F   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7EBF4F   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#CAE4B6);   BORDER-LEFT:   #7EBF4F   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7EBF4F   1px   solid   
  }   
  .btn2   {padding:   2   4   0   4;font-size:12px;height:23;background-color:#ece9d8;border-width:1;}   
  .btn3_mouseout   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
  }   
  .btn3_mouseover   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#D7E7FA);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
  }   
  .btn3_mousedown   
  {   
    BORDER-RIGHT:   #FFE400   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #FFE400   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #FFE400   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #FFE400   1px   solid   
  }   
  .btn3_mouseup   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
  }   
  .btn_2k3   {   
    BORDER-RIGHT:   #002D96   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #002D96   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#FFFFFF,   EndColorStr=#9DBCEA);   BORDER-LEFT:   #002D96   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #002D96   1px   solid   
  }   
    
  .btn_flat   {   
    BORDER-RIGHT:   #ffffff   1px   solid;   BORDER-TOP:   #ffffff   1px   solid;   FONT-SIZE:   12px;   FILTER:     BORDER-LEFT:   #ffffff   1px   solid;   CURSOR:   hand;   COLOR:   black;   BORDER-BOTTOM:   #ffffff   1px   solid   
  }   

 

css+html:

 <style>   
  .btn   {   
    BORDER-RIGHT:   #7b9ebd   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7b9ebd   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#cecfde);   BORDER-LEFT:   #7b9ebd   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7b9ebd   1px   solid   
  }   
  .btn1_mouseout   {   
    BORDER-RIGHT:   #7EBF4F   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7EBF4F   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#B3D997);   BORDER-LEFT:   #7EBF4F   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7EBF4F   1px   solid   
  }   
  .btn1_mouseover   {   
    BORDER-RIGHT:   #7EBF4F   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #7EBF4F   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#CAE4B6);   BORDER-LEFT:   #7EBF4F   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #7EBF4F   1px   solid   
  }   
  .btn2   {padding:   2   4   0   4;font-size:12px;height:23;background-color:#ece9d8;border-width:1;}   
  .btn3_mouseout   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
     ;width:60px; height:22px;letter-spacing: 0.2cm
  }   
  .btn3_mouseover   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#D7E7FA);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
     ;width:60px; height:22px;letter-spacing: 0.2cm
  }   
  .btn3_mousedown   
  {   
    BORDER-RIGHT:   #FFE400   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #FFE400   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #FFE400   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #FFE400   1px   solid   
    ;width:60px; height:22px;letter-spacing: 0.2cm
  }   
  .btn3_mouseup   {   
    BORDER-RIGHT:   #2C59AA   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #2C59AA   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#ffffff,   EndColorStr=#C3DAF5);   BORDER-LEFT:   #2C59AA   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #2C59AA   1px   solid   
     ;width:60px; height:22px;letter-spacing: 0.2cm
  }   
  .btn_2k3   {   
    BORDER-RIGHT:   #002D96   1px   solid;   PADDING-RIGHT:   2px;   BORDER-TOP:   #002D96   1px   solid;   PADDING-LEFT:   2px;   FONT-SIZE:   12px;   FILTER:   progid:DXImageTransform.Microsoft.Gradient(GradientType=0,   StartColorStr=#FFFFFF,   EndColorStr=#9DBCEA);   BORDER-LEFT:   #002D96   1px   solid;   CURSOR:   hand;   COLOR:   black;   PADDING-TOP:   2px;   BORDER-BOTTOM:   #002D96   1px   solid   
    ;width:60px; height:22px;letter-spacing: 0.2cm
  }   
    
  .btn_flat   {   
    BORDER-RIGHT:   #ffffff   1px   solid;   BORDER-TOP:   #ffffff   1px   solid;   FONT-SIZE:   12px;   FILTER:     BORDER-LEFT:   #ffffff   1px   solid;   CURSOR:   hand;   COLOR:   black;   BORDER-BOTTOM:   #ffffff   1px   solid   
  }   
  </style>   
  <body>   
    
    
  <button   class=btn_flat   title="好看的按钮">好看的按钮1</button><P></p>   
    
  <button   class=btn   title="好看的按钮">好看的按钮1</button><P></p>   
  <button     
  class=btn1_mouseout   onmouseover="this.className='btn1_mouseover'"   
    onmouseout="this.className='btn1_mouseout'"   
    title="好看的按钮">好看的按钮2</button>         
  <button     
  class=btn1_mouseout   onmouseover="this.className='btn1_mouseover'"   
    onmouseout="this.className='btn1_mouseout'"   DISABLED>好看的按钮3</button>   
  <P>   
  <button   class=btn2   title="好看的按钮">好看的按钮4</button>   
  <P>   
  <button   class=btn3_mouseout   onmouseover="this.className='btn3_mouseover'"   
    onmouseout="this.className='btn3_mouseout'"   
    onmousedown="this.className='btn3_mousedown'"   
      onmouseup="this.className='btn3_mouseup'"   
      title="好看的按钮">查询</button>   
  <P>   
  <button   class=btn_2k3   title="好看的按钮">查询</button>   

 

分享到:
评论
1 楼 coosummer 2015-11-11  
推荐使用http://buttoncssgenerator.com ,可以生成各种效果的按钮css,包括圆角、渐进颜色、阴影,并兼容各大主流浏览器

相关推荐

    好看的毛玻璃效果的登陆界面

    毛玻璃效果,又称模糊效果或Glassmorphism,是近年来在网页设计中流行的一种风格,它模仿了玻璃透明且带有微妙模糊感的特性,为用户界面带来了一种轻盈且现代的视觉体验。在这个"好看的毛玻璃效果的登陆界面"项目中...

    纯CSS3霓虹样式搜索框动画特效特效代码

    【纯CSS3霓虹样式搜索框动画特效特效代码】是一个利用现代CSS3技术实现的创新设计,它将传统的搜索框赋予了霓虹灯般的视觉效果,并且带有动态展开与收缩的交互功能。这个特效主要依赖于CSS3的transform属性,通过...

    背景高斯模糊的登录界面

    本文将详细解析如何创建一个带有背景高斯模糊效果的登录界面,并探讨相关技术及其应用。 首先,我们需要理解“背景高斯模糊”的概念。高斯模糊是一种图像处理技术,它通过对图像进行加权平均来减少图像的噪声和增加...

    70款经典Dreamweaver插件

    mx142100_mmflabuttonstyles 13款Flash Button,并带有.fla的源文件 mx196756_turkeyscounties 80多个国家的一个下拉菜单 FlashImage 响应鼠标事件的图片渐显渐隐效果 real_networks 在页面中插入流式播放的Real视频...

    Dreamweaver 插件集

    13款Flash Button,并带有.fla的源文件 mx196756_turkeyscounties 80多个国家的一个下拉菜单 FlashImage 响应鼠标事件的图片渐显渐隐效果 real_networks 在页面中插入流式播放的Real视频和音频文件 MX131662_...

    ie6 png图片黑边处理办法

    由于IE6对PNG格式图片的支持不足,经常导致带有半透明效果的PNG图片出现黑边或者显示不正常。针对这个问题,有几种有效的解决策略,以下将详细介绍这三种方法。 1. **CSS Alpha Transparency Filter** 在CSS中,...

    javascript常用特效.doc

    6. **透明样式**: CSS滤镜可以实现图像的透明效果,例如`filter:alpha(opacity=90,style=1)`,`opacity`定义透明度,`style`定义透明类型。 7. **观察键值**: 通过`onkeydown`事件监听键盘按键,`window.event....

    flex3的cookbook书籍完整版dpf(包含目录)

    flex3的cookbook书籍完整版dpf(包含目录),目录是我花了两个多小时自己整理的,希望对大家有帮助。 目录: 第一章.Flex与ActionScript基础(3) 1.1节.用FlexBuilder创建Flex项目 1.2节.用FlexBuilder创建Flex库项目 ...

Global site tag (gtag.js) - Google Analytics