CSS常用样式效果

2016-02-19 16:52 6 1 收藏

今天图老师小编要跟大家分享CSS常用样式效果,精心挑选的过程简单易学,喜欢的朋友一起来学习吧!

【 tulaoshi.com - Web开发 】

虽然CSS样式的学习需要我们动手多实践,需要多做案例,思致思考,但有时候注意资料的收集与整理也是非常重要的,在实际开发中往往会起到事半功倍的效果。在的文档中,也提供了丰富的内容。下面一些关于按钮、文本框、表单的常用CSS样式。大家可以参考。
  一、按钮样式
.buttoncss {
  font-family: "tahoma", "宋体"; /**/
  font-size:9pt; color: #003399;
  border: 1px #003399 solid;
  color:#006699;
  border-bottom: #93bee2 1px solid;
  border-left: #93bee2 1px solid;
  border-right: #93bee2 1px solid;
  border-top: #93bee2 1px solid;
  background-image:url(../images/bluebuttonbg.gif);
  background-color: #e8f4ff;
  cursor: hand;
  font-style: normal ;
  width:60px;
  height:22px;
}
  二、蓝色按钮
.bluebuttoncss {
  font-family: "tahoma", "宋体"; /**/
  font-size: 9pt; color: #003366;
  border: 0px #93bee2 solid;
  border-bottom: #93bee2 1px solid;
  border-left: #93bee2 1px solid;
  border-right: #93bee2 1px solid;
  border-top: #93bee2 1px solid;*/
  background-image:url(../images/blue_button_bg.gif);
  background-color: #ffffff;
  cursor: hand;
  font-style: normal ;
}
  三、红色按钮
.redbuttoncss {
  font-family: "tahoma", "宋体"; /**/
  font-size: 9pt; color: #0066cc;
  border: 1px #93bee2 solid;
  border-bottom: #93bee2 1px solid;
  border-left: #93bee2 1px solid;
  border-right: #93bee2 1px solid;
  border-top: #93bee2 1px solid;
  background-image:url(../images/redbuttonbg.gif);
  background-color: #ffffff;
  cursor: hand;
  font-style: normal ;
}
四、选择按钮
.selectbuttoncss{
  font-family: "tahoma", "宋体"; /**/
  font-size: 9pt; color: #0066cc;
  border: 1px #93bee2 solid;
  border-bottom: #93bee2 1px solid;
  border-left: #93bee2 1px solid;
  border-right: #93bee2 1px solid;
  border-top: #93bee2 1px solid;
  background-image:url(../images/blue_button_bg.gif);
  background-color: #ffffff;
  cursor: hand;
  font-style: normal ;
} 
五、绿色按钮
.greenbuttoncss {
  font-family: "tahoma", "宋体"; /**/
  font-size: 9pt; color: #0066cc;
  border: 1px #93bee2 solid;
  border-bottom: #93bee2 1px solid;
  border-left: #93bee2 1px solid;
  border-right: #93bee2 1px solid;
  border-top: #93bee2 1px solid;
  background-image:url(../images/greenbuttonbg.gif);
  background-color: #ffffff;
  cursor: hand;
  font-style: normal ;
}
  六、图像按钮
.imagebutton{
  cursor: hand;  /*改变鼠标形状 */
}
  七、页面正文
body {
  scrollbar-face-color: #ededf3;
  scrollbar-highlight-color: #ffffff;
  scrollbar-shadow-color: #93949f;
  scrollbar-3dlight-color: #ededf3;
  scrollbar-arrow-color: #082468;
  scrollbar-track-color: #f7f7f9;
  scrollbar-darkshadow-color: #ededf3;
  font-size: 9pt; /**/
  color: #003366;
  overflow:auto;
}
td { font-size: 12px }
th {
  font-size: 12px;
}
八、下拉选择框
select{
  border-right: #000000 1px solid;
  border-top: #ffffff 1px solid;
  font-size: 12px; /**/
  border-left: #ffffff 1px solid;
  color:#003366;
  border-bottom: #000000 1px solid;
  background-color: #f4f4f4;
}
  九、线条文本编辑框
.editbox{
  background: #ffffff;
  border: 1px solid #b7b7b7;
  color: #003366;
  cursor: text;
  font-family: "arial";
  font-size: 9pt;
  height: 18px;
  padding: 1px; /**/
}
  十、多行文本框
.multieditbox{
  background: #f8f8f8;
  border-bottom: #b7b7b7 1px solid;
  border-left: #b7b7b7 1px solid;
  border-right: #b7b7b7 1px solid;
  border-top: #b7b7b7 1px solid;
  color: #000000;
  cursor: text;
  font-family: "arial";
  font-size: 9pt;
  padding: 1px; /**/
}
  十一、阴影风格的表单
.shadow {
  position:absolute;
  z-index:1000;
  top:0px;
  left:0px; /**/
  background:gray;
  background-color:#ffcc00;
  filter : progidximagetransform.microsoft.dropshadow(color=#ff404040,offx=2,offy=2,positives=true);
}
  十二、只显一条横线的输入框
.logintxt{
  border-right: #ffffff 0px solid;
  border-top: #ffffff 0px solid;
  font-size: 9pt; /**/
  border-left: #ffffff 0px solid;
  border-bottom: #c0c0c0 1px solid;
  background-color: #ffffff
}
  十三、没有边框的输入框
.noneinput{
  text-align:center;
  width:99%;height:99%;
  border-top-style: none;
  border-right-style: none;
  border-left-style: none;
  background-color: #f6f6f6;
  border-bottom-style: none;
}

来源:https://www.tulaoshi.com/n/20160219/1613387.html

延伸阅读
标签: Web开发
font版本:CSS1/CSS2 兼容性:IE4+ NS4+ 继承性:有 语法: font : font-style || font-variant || font-weight || font-size || line-height || font-family font : caption | icon | menu | message-box | small-caption | status-bar 取值: font-style : CSS1 请参阅 font-style 属性 font-variant : CSS1 请参阅 font-vari...
标签: Web开发
前面我们了解了CSS的语法,但要想在浏览器中显示出效果,就要让浏览器识别并调用。当浏览器读取样式表时,要依照文本格式来读,这里介绍四种在页面中插入样式表的方法:链入外部样式表、内部样式表、导入外表样式表和内嵌样式。 1. 链入外部样式表 链入外部样式表是把样式表保存为一个样式表文件,然后在页面中用link标记链接到...
标签: Web开发
color版本:CSS1 兼容性:IE4+ NS4+ 继承性:有 语法: color : color 取值: color : 指定颜色。请参阅 颜色单位 和 附录:颜色表 说明: 检索或设置对象的文本颜色。无默认值。 注意,用颜色名称指定 color 不被一些浏览器接受。但使用 RGB 值指定颜色能被所有里浏览器识别并正确显示。 此属性对于 currentStyle 对象而言是只...
Dust-Me selectors Dust-Me是一个很有用也很好用的Firefox插件,它可以分析到你的页面中调用的所有CSS文件并分析那些在页面中没有被用到。 支持本地和远程样式文件,包括使用link标签、?xml-stylesheet?处理指令、@import语句等方式引入的样式文件;(但是不支持页面中的style块和内联样式)支持IE条件注释中引入的样式文件;可以检查一个页面...
标签: Web开发
使用缩写可以帮助减少你CSS文件的大小,更加容易阅读。css缩写的主要规则如下: 颜色 16进制的色彩值,如果每两位的值相同,可以缩写一半,例如: #000000可以缩写为#000;#336699可以缩写为#369; 盒尺寸 通常有下面四种书写方法: ●property:value1; 表示所有边都是一个值value1; ●property:value1 valu...

经验教程

615

收藏

6

精华推荐

CSS常用技巧汇总

CSS常用技巧汇总

秋雨随风5

CSS常用技巧介绍

CSS常用技巧介绍

沸腾的泡泡儿

常用的CSS知识

常用的CSS知识

迷恋那坏笑

微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部