码迷,mamicode.com
首页 > Web开发 > 详细

常用的css样式

时间:2015-07-01 11:42:33      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:

overflow:hidden;自动隐藏超出的内容,防止撑开层和表格的范围

!important 指定样式规则的应用优先权
文字类 color: #FF0000;文字颜色 font-family: "Arial", "Helvetica", "sans-serif";字体 font-size: 9px;字号 text-align:center; 居中(left为居左,right为居右) line-height:28px;行高(可用150%值) font-style: italic;斜体(oblique偏斜体) font-weight: bold;服务粗体(bolder特粗,400粗值) font-variant: small-caps;小型大写字母 text-transform: capitalize;首字母大写 text-decoration: underline overline line-through blink;下划线,上划线,删除线,闪烁 text-indent: 2em;文字缩进2个字体高(或15px,即15象素)

背景类 background-attachment: fixed;固定位置(scroll滚动) background: #0066CC;背景色(transparent透明) background: url(/image/more2.gif);背景图片 background-repeat: repeat;重复(repeat-x横向重复,repeat-y纵向重复)

background-position: center top;水平居中 垂直顶部(left center水平居左 垂直居中)

background:url(/image/dtbg.gif) #FEFEFE no-repeat

right bottom(2px 5px); 背景图片、 背景颜色、图片不重复、背景图片从右下角开始(图片距左2px距上5px)

框架位置类
clear: both;两边拒排浮动对象(left左边拒排浮动对象,right右边拒排浮动对象)
float: left;浮动对象位置居左(right, 最新列车时刻表位置居右)
position:relative; 相对位置,一般在上级框架中设定 极品时刻表
position:absolute; 绝对位置,配合上级框架的设定对本级框架设定,设置top、left值
top:5px; 页面绝对或相对于框架顶端绝对位置
left:10px; 页面绝对或相对于框架左边绝对位置
width: 100px;宽100px
height: 200px;高200px(可用auto和100%值)
margin 上海火车时刻表:10px 20px 10px 20px;
上右下左页边距(值相同可省写margin:10px)
单独指定用margin-top:10px; (margin-right、margin-bottom、margin-left)
padding:20px 10px 10px 20p;
上右下左内容离边框的距离(值相同可省写padding:10px)
单独指定用padding-top:10px;(padding-right、padding-bottompadding-left)
border:#ccc 1px solid 成都列车时刻表;
四边框颜色、线宽、实线(dotted虚线,dashed点画线,double双线,ridge脊线)
单独指定用border-top:#ccc 1px solid;border-right:#ccc 1px solid
等等
项目列表类 list-style-position: outside;位置为外(inside内) list-style-image: url(/yh/image/more04.gif);项目符号图像 临客时刻表 list-style-type: disc;项目符号为圆点(circle圆圈,square方块)
扩展类 cursor: e-resize;鼠标样式 filter: Blur(Add=4, Direction=8, Strength=4);滤镜 filter: FlipH;横向翻转(FlipV gprs流量费纵向翻转)
单独设置链接
#bottool a:link{color:#fff};未访问的颜色
#bottool a:visited{color:#fff};已访问的颜色 流量软件
#bottool a:hover{color:#ff0};鼠标在链接上

placeh


 

HTML5(新属性)

placeholder 属性提供可描述输入字段预期值的提示信息(hint)。

常用的css样式

标签:

原文地址:http://www.cnblogs.com/MissZ/p/4612510.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!