css样式表

来源:互联网 发布:个人顶级域名 编辑:程序博客网 时间:2024/05/18 02:00
css 剩余知识点汇总1.伪元素:focus{color:red;}例如:input:focus{background-color:yellow;}<input type = "text" name = "username" />//当输入内容的时候,显示的背景颜色为黄色.2.伪元素.first-line{color:red;}例如:p.first-line{color:red;}效果为:p标签的首行显示为红色.3.first-letter.first-letter{color:red;}例如:p.first-letter{color:red;}效果为:首行的首字母显示为红色.4..before  .after  在标签的首位置和尾位置,插入内容.5.选择器的优先级:因此这三个简单选择器的优先级顺序为:HTML标签属性>id选择器>类选择器>元素选择器6.css 样式表的使用方式:1.background-color:  设置背景颜色transparent  透明inherit  继承父类颜色2.background-image  设置背景图片background-repeat  设置背景图片是否重复.repeat 横向纵向都重复repeat-x  横向repeat-y 纵向no-repeat 不重复3.background-position  设置背景图片的位置top,left...x% y%xpx ypx;3.color  字体颜色inherit  继承父类颜色4.文字缩进text-indent  设置缩进(多行内容只有第一行缩进)xpx  像素x% 基于父元素宽度的百分比inherit 继承父元素的文字缩进属性5.文本对其方式 text-alignleftrightcenter6.font-size  字体大小xpx  7.font-family  设置字体times Georgia8.font-style  字体风格italic 斜体normal 正常显示....9.font-weight 字体加粗设置normal 正常显示bold  加粗bolder bold的扩展lighter bold的缩减整数值....10.letter-spacing  字母间距默认是011.word-spacing  字间距12.text-transform 字符转换none 不做处理uppercase 大写lowercase 小写capitalize 首字母大写13.text-decoration  文本修饰 none 不做处理underline  下划线overline 上划线line-through 文字中间的贯穿线bink 闪烁效果14.list-style-type  列表的标志类型none 无标志disc 实心圆circle 空心圆square 实心方块decimal 数字标志lower-roman  小写罗马文upper-roman 大写罗马文lower-alpha 小写字母upper-alpha 大写字母15.表格边框border 属性设置表格边框border-collapse  设置边框折叠为单一边框text-align(水平) vertical-align(垂直)  文本对其方式padding 控制表格中内容与边框的距离border-spacing 设置分隔单元格边框的距离caption-side 设置表格标题的位置empty-cells 设置是否显示表格中的空单元格table-layout  设置显示单元.行.列算法16.outline 轮廓outline是绘制于元素周围的一条线,位于边框边缘的外围,可起到突出元素的作用outline-color 颜色outline-style 轮廓的样式outline-width 轮廓的宽度

0 0
原创粉丝点击