css常用的属性大全

合集下载

css常用属性

css常用属性

normal :默认值。默认行高 length :百分比数字 | 由浮点数字和单位标识符 组成的长度值,允许为负值。其百分比取值是基于字 体的高度尺寸
Code:ex04/css_news.htm
常用css属性——文本控制
text-align : left | right | center | justify 设置或检索对象中文本的对齐方式。 left :默认值。左对齐 right :右对齐 center :居中对齐 justify :两端对齐 auto :自动 baseline :基线对齐 sub :垂直对齐文本的下标 super :垂直对齐文本的上标 top :内容对象顶端对齐 text-top :将支持 valign 特性的对象的文本与对 象顶端对齐 middle :中部对齐 bottom :底端对齐 text-bottom :文本与对象底端对齐 length :CSS2功能 由浮点数字和单位标识符组成的长度值 | 百分数。 可为负数。定义由基线算起的偏移量。基线对于数值 来说为0,对于百分数来说就是0%。 normal :默认值。允许在词间换行 break-all :与 normal 相同。也允许非亚洲语言文 本行的任意字内断开。 keep-all :对于中文,韩文,日文,不允许字断开。 适合包含少量亚洲文本的非亚洲文本
background-color : transparent | color background-image : none | url ( url ) background-position : position || position background-repeat : repeat | no-repeat | repeat-x | repeat-y layer-background-color : transparent | color background:颜色 背景图片 重复性 位置; 应用举例: 1、表格的背景图像和背景色 2、给textarea生成水平笔记效果 3、制作重复性背景图片、图片虚线的技巧。 背景色 背景图像 背景图像的定位,位置坐标 指定背景图像是否重复,怎么重复 指定背景色透明 可仅用background代替上面各属性。

常用CSS代码大全(工作必备)

常用CSS代码大全(工作必备)

常用CSS代码大全(工作必备)用html+css可以很方便的进行网页的排版布局,但不是每一种属性或者代码我们都铭记于心,最近我把CSS中的常用代码进行了归纳总结,方便自己以后查看,同时也分享给大家,希望对你们有用。

一.文本设置1、font-size: 字号参数2、font-style: 字体格式3、font-weight: 字体粗细4、颜色属性 color:参数注意使用网页安全色二、超链接设置text-decoration: 参数主要目的是在浏览器显示文本链接时更改下划线。

参数取值范围:underline:为文字加下划线overline:为文字加上划线line-through:为文字加删除线blink:使文字闪烁none:不显示上述任何效果三、背景1、背景颜色 padding: 0px 0px 0px 10px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); color: rgb(61, 70, 77); font-size: 16px; border-left: 1px solid rgb(128, 128, 128); background: rgb(238, 238, 238); box-shadow: rgba(7, 17, 27, 0.05) 0px 4px 8px 0px; box-sizing: border-box; border-radius: 8px; font-family: "Helvetica Neue", Helvetica, "PingFang SC", 微软雅黑, Tahoma, Arial, sans-serif;">2、背景图片background-image: url(URL)URL就是背景图片的存放路径,none表示无。

3、背景图片重复 background-repeat: 参数参数取值范围:no-repeat:不重复平铺背景图片repeat-x:使图片只在水平方向上平铺repeat-y:使图片只在垂直方向上平铺如果不指定背景图像重复属性,浏览器默认水平和垂直平铺背景图像。

CSS——八大属性

CSS——八大属性

CSS——⼋⼤属性⼀、颜⾊有三种表⽰颜⾊的⽅法:英⽂单词、⼆进制颜⾊代表码、rgb,⼆、字体font-size:15px;设置字体⼤⼩,常⽤像素指定字体⼤⼩,指定长度的字号,不会随着浏览器的变化⽽变化font-family:宋体;设置字体类型font-weight:lighter、bold、bolder,设置字体粗细,常⽤的三种效果选择font-style:oblique;设置字体倾斜font-variant:small-caps;将⼩写字母转成⼤写字母;color:设置字体颜⾊<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>exercise4</title><style>#color_en{color:blue}#color_bin{color:#F0F;}#color_rgb{color:rgb(255,0,255)}#color_pellucidity{color:rgba(255,0,255,0.2)}#ablout_font{background-color:rgba(0,255,255,0.2);}#font_size{background-color:rgba(0,255,255,0.2);font-size:15px;}#font_family{background-color:rgba(0,255,255,0.2);font-family:YouYuan;}#font_lighter{background-color:rgba(0,255,255,0.2);font-weight:lighter;}#font_bold{background-color:rgba(0,255,255,0.2);font-weight:bold;}#font_bolder{background-color:rgba(0,255,255,0.2);font-weight:bolder;}#font_style{background-color:rgba(0,255,255,0.2);font-style:oblique;}</style></head><body><p>练习属性property</p><p id="ablout_font">⼆、关于字体</p><p id="font_size">font-size设置字体⼤⼩,如:15px</p><p id="font_family">font-family设置字体类型如:YouYuan</p><p id="font_weight"><a id="font_bolder">bolder</a></p><p id="font_style">font-style设置字体倾斜</p><p id="color_en">⼀、关于颜⾊</p><p id="color_bin">除了使⽤英⽂单词,还可以使⽤⼗六进制颜⾊对应表(如下图,#FFFF00表⽰黄⾊,还可简写成#FF0)<table border="0"><tbody><tr><td height="30" width="95" bgcolor="#ffffff">#FFFFFF</td><td height="30" width="95" bgcolor="#dddddd">#DDDDDD</td><td height="30" width="95" bgcolor="#aaaaaa">#AAAAAA</td><td height="30" width="95" bgcolor="#888888">#888888</td><td height="30" width="95" bgcolor="#666666">#666666</td><td height="30" width="95" bgcolor="#444444">#444444</td><td height="30" width="95" bgcolor="#000000">#000000</td></tr><tr><td height="30" width="95" bgcolor="#ffb7dd">#FFB7DD</td><td height="30" width="95" bgcolor="#ff88c2">#FF88C2</td><td height="30" width="95" bgcolor="#ff44aa">#FF44AA&nbsp;</td><td height="30" width="95" bgcolor="#ff0088">#FF0088&nbsp;</td><td height="30" width="95" bgcolor="#c10066">#C10066&nbsp;</td><td height="30" width="95" bgcolor="#a20055">#A20055&nbsp;</td><td height="30" width="95" bgcolor="#8c0044">#8C0044&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffcccc">#FFCCCC</td><td height="30" width="95" bgcolor="#ff8888">#FF8888</td><td height="30" width="95" bgcolor="#ff3333">#FF3333&nbsp;</td><td height="30" width="95" bgcolor="#ff0000">#FF0000&nbsp;</td><td height="30" width="95" bgcolor="#cc0000">#CC0000&nbsp;</td><td height="30" width="95" bgcolor="#aa0000">#AA0000&nbsp;</td><td height="30" width="95" bgcolor="#880000">#880000&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffc8b4">#FFC8B4</td><td height="30" width="95" bgcolor="#ffa488">#FFA488</td><td height="30" width="95" bgcolor="#ff7744">#FF7744&nbsp;</td><td height="30" width="95" bgcolor="#ff5511">#FF5511&nbsp;</td><td height="30" width="95" bgcolor="#e63f00">#E63F00&nbsp;</td><td height="30" width="95" bgcolor="#c63300">#C63300&nbsp;</td><td height="30" width="95" bgcolor="#a42d00">#A42D00&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffddaa">#FFDDAA</td><td height="30" width="95" bgcolor="#ffbb66">#FFBB66</td><td height="30" width="95" bgcolor="#ffaa33">#FFAA33</td><td height="30" width="95" bgcolor="#ff8800">#FF8800&nbsp;</td><td height="30" width="95" bgcolor="#ee7700">#EE7700&nbsp;</td><td height="30" width="95" bgcolor="#cc6600">#CC6600&nbsp;</td><td height="30" width="95" bgcolor="#bb5500">#BB5500&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffee99">#FFEE99</td><td height="30" width="95" bgcolor="#ffdd55">#FFDD55</td><td height="30" width="95" bgcolor="#ffcc22">#FFCC22</td><td height="30" width="95" bgcolor="#ffbb00">#FFBB00&nbsp;</td><td height="30" width="95" bgcolor="#ddaa00">#DDAA00&nbsp;</td><td height="30" width="95" bgcolor="#aa7700">#AA7700&nbsp;</td><td height="30" width="95" bgcolor="#886600">#886600&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffffbb">#FFFFBB</td><td height="30" width="95" bgcolor="#ffff77">#FFFF77</td><td height="30" width="95" bgcolor="#ffff33">#FFFF33</td><td height="30" width="95" bgcolor="#ffff00">#FFFF00</td><td height="30" width="95" bgcolor="#eeee00">#EEEE00</td><td height="30" width="95" bgcolor="#bbbb00">#BBBB00</td><td height="30" width="95" bgcolor="#888800">#888800</td></tr><tr><td height="30" width="95" bgcolor="#eeffbb">#EEFFBB</td><td height="30" width="95" bgcolor="#ddff77">#DDFF77</td><td height="30" width="95" bgcolor="#ccff33">#CCFF33</td><td height="30" width="95" bgcolor="#bbff00">#BBFF00</td><td height="30" width="95" bgcolor="#99dd00">#99DD00</td><td height="30" width="95" bgcolor="#88aa00">#88AA00</td><td height="30" width="95" bgcolor="#ccff99">#CCFF99</td><td height="30" width="95" bgcolor="#bbff66">#BBFF66</td><td height="30" width="95" bgcolor="#99ff33">#99FF33</td><td height="30" width="95" bgcolor="#77ff00">#77FF00</td><td height="30" width="95" bgcolor="#66dd00">#66DD00</td><td height="30" width="95" bgcolor="#55aa00">#55AA00</td><td height="30" width="95" bgcolor="#227700">#227700</td></tr><tr><td height="30" width="95" bgcolor="#99ff99">#99FF99</td><td height="30" width="95" bgcolor="#66ff66">#66FF66</td><td height="30" width="95" bgcolor="#33ff33">#33FF33</td><td height="30" width="95" bgcolor="#00ff00">#00FF00</td><td height="30" width="95" bgcolor="#00dd00">#00DD00</td><td height="30" width="95" bgcolor="#00aa00">#00AA00</td><td height="30" width="95" bgcolor="#008800">#008800</td></tr><tr><td height="30" width="95" bgcolor="#bbffee">#BBFFEE</td><td height="30" width="95" bgcolor="#77ffcc">#77FFCC</td><td height="30" width="95" bgcolor="#33ffaa">#33FFAA</td><td height="30" width="95" bgcolor="#00ff99">#00FF99</td><td height="30" width="95" bgcolor="#00dd77">#00DD77</td><td height="30" width="95" bgcolor="#00aa55">#00AA55</td><td height="30" width="95" bgcolor="#008844">#008844</td></tr><tr><td height="30" width="95" bgcolor="#aaffee">#AAFFEE</td><td height="30" width="95" bgcolor="#77ffee">#77FFEE</td><td height="30" width="95" bgcolor="#33ffdd">#33FFDD</td><td height="30" width="95" bgcolor="#00ffcc">#00FFCC</td><td height="30" width="95" bgcolor="#00ddaa">#00DDAA</td><td height="30" width="95" bgcolor="#00aa88">#00AA88</td><td height="30" width="95" bgcolor="#008866">#008866</td></tr><tr><td height="30" width="95" bgcolor="#99ffff">#99FFFF</td><td height="30" width="95" bgcolor="#66ffff">#66FFFF</td><td height="30" width="95" bgcolor="#33ffff">#33FFFF</td><td height="30" width="95" bgcolor="#00ffff">#00FFFF</td><td height="30" width="95" bgcolor="#00dddd">#00DDDD</td><td height="30" width="95" bgcolor="#00aaaa">#00AAAA</td><td height="30" width="95" bgcolor="#008888">#008888</td></tr><tr><td height="30" width="95" bgcolor="#cceeff">#CCEEFF</td><td height="30" width="95" bgcolor="#77ddff">#77DDFF</td><td height="30" width="95" bgcolor="#33ccff">#33CCFF</td><td height="30" width="95" bgcolor="#00bbff">#00BBFF</td><td height="30" width="95" bgcolor="#009fcc">#009FCC</td><td height="30" width="95" bgcolor="#0088a8">#0088A8</td><td height="30" width="95" bgcolor="#007799">#007799</td></tr><tr><td height="30" width="95" bgcolor="#ccddff">#CCDDFF</td><td height="30" width="95" bgcolor="#99bbff">#99BBFF</td><td height="30" width="95" bgcolor="#5599ff">#5599FF</td><td height="30" width="95" bgcolor="#0066ff">#0066FF&nbsp;</td> <td height="30" width="95" bgcolor="#0044bb">#0044BB&nbsp;</td> <td height="30" width="95" bgcolor="#003c9d">#003C9D&nbsp;</td> <td height="30" width="95" bgcolor="#003377">#003377&nbsp;</td> </tr><tr><td height="30" width="95" bgcolor="#ccccff">#CCCCFF</td><td height="30" width="95" bgcolor="#9999ff">#9999FF</td><td height="30" width="95" bgcolor="#5555ff">#5555FF&nbsp;</td> <td height="30" width="95" bgcolor="#0000ff">#0000FF&nbsp;</td> <td height="30" width="95" bgcolor="#0000cc">#0000CC&nbsp;</td> <td height="30" width="95" bgcolor="#0000aa">#0000AA&nbsp;</td> <td height="30" width="95" bgcolor="#000088">#000088&nbsp;</td> </tr><tr><td height="30" width="95" bgcolor="#ccbbff">#CCBBFF</td><td height="30" width="95" bgcolor="#9f88ff">#9F88FF</td><td height="30" width="95" bgcolor="#7744ff">#7744FF&nbsp;</td> <td height="30" width="95" bgcolor="#5500ff">#5500FF&nbsp;</td> <td height="30" width="95" bgcolor="#4400cc">#4400CC&nbsp;</td> <td height="30" width="95" bgcolor="#2200aa">#2200AA&nbsp;</td> <td height="30" width="95" bgcolor="#220088">#220088&nbsp;</td> </tr><tr><td height="30" width="95" bgcolor="#7700ff">#7700FF&nbsp;</td><td height="30" width="95" bgcolor="#5500dd">#5500DD&nbsp;</td><td height="30" width="95" bgcolor="#4400b3">#4400B3&nbsp;</td><td height="30" width="95" bgcolor="#3a0088">#3A0088&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#e8ccff">#E8CCFF</td><td height="30" width="95" bgcolor="#d28eff">#D28EFF</td><td height="30" width="95" bgcolor="#b94fff">#B94FFF&nbsp;</td><td height="30" width="95" bgcolor="#9900ff">#9900FF&nbsp;</td><td height="30" width="95" bgcolor="#7700bb">#7700BB&nbsp;</td><td height="30" width="95" bgcolor="#66009d">#66009D&nbsp;</td><td height="30" width="95" bgcolor="#550088">#550088&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#f0bbff">#F0BBFF</td><td height="30" width="95" bgcolor="#e377ff">#E38EFF</td><td height="30" width="95" bgcolor="#d93eff">#E93EFF&nbsp;</td><td height="30" width="95" bgcolor="#cc00ff">#CC00FF&nbsp;</td><td height="30" width="95" bgcolor="#a500cc">#A500CC&nbsp;</td><td height="30" width="95" bgcolor="#7a0099">#7A0099&nbsp;</td><td height="30" width="95" bgcolor="#660077">#660077&nbsp;</td></tr><tr><td height="30" width="95" bgcolor="#ffb3ff">#FFB3FF</td><td height="30" width="95" bgcolor="#ff77ff">#FF77FF</td><td height="30" width="95" bgcolor="#ff3eff">#FF3EFF&nbsp;</td><td height="30" width="95" bgcolor="#ff00ff">#FF0&nbsp;0FF&nbsp;</td><td height="30" width="95" bgcolor="#cc00cc">#CC00CC&nbsp;</td><td height="30" width="95" bgcolor="#990099">#990099&nbsp;</td><td height="30" width="95" bgcolor="#770077">#770077&nbsp;</td></tr></tbody></table></p><p id="color_rgb">颜⾊还可以使⽤rgb(255,0,255)的⽅式</p><p id="color_pellucidity">使⽤rgba(255,0,255,0.6)最后⼀位设置透明度,取值0-1,</p></body></html>View Code注意:可使⽤复合属性font,设置字体相关属性值,不同属性值之间使⽤空格隔开。

css属性大全中文对照表

css属性大全中文对照表

css属性⼤全中⽂对照表Aalign-content 规定弹性容器内的⾏之间的对齐⽅式,当项⽬不使⽤所有可⽤空间时。

align-items 规定弹性容器内项⽬的对齐⽅式。

align-self 规定弹性容器内所选项⽬的对齐⽅式。

all 重置所有属性(除了 unicode-bidi 和 direction)。

animation 所有 animation-* 属性的简写属性。

animation-delay 规定开始动画的延迟。

animation-direction 规定动画是向前播放、向后播放还是交替播放。

animation-duration 规定动画完成⼀个周期应花费的时间。

animation-fill-mode 规定元素在不播放动画时(在开始之前、结束之后、或同时)的样式。

animation-iteration-count 规定动画的播放次数。

animation-name 规定 @keyframes 动画的名称。

animation-play-state 规定动画是播放还是暂停。

animation-timing-function 规定动画的速度曲线。

Bbackface-visibility 定义当⾯对⽤户时元素的背⾯是否应可见。

background 所有 background-* 属性的简写属性。

background-attachment 设置背景图像是与页⾯的其余部分⼀起滚动还是固定的。

background-blend-mode 规定每个背景图层(颜⾊/图像)的混合模式。

background-clip 定义背景(颜⾊或图像)应在元素内延伸的距离。

background-color 规定元素的背景⾊。

background-image 规定元素的⼀幅或多幅背景图像。

background-origin 规定背景图像的初始位置。

background-position 规定背景图像的位置。

background-repeat 设置是否以及如何重复背景图像。

CSS_style属性大全

CSS_style属性大全

CSS style属性大全显示:标签属性/属性行为集合事件滤镜方法对象样式一、标签属性属性描述ALIGN align 设置或获取表格排列。

ALLOWTRANSPARENCY allowTransparency 设置或获取对象是否可为透明。

APPLICATION APPLICATION 表明对象的内容是否为HTML 应用程序(HTA),以便免除浏览器安全模式。

ATOMICSELECTION 指定元素及其内容是否可以一不可见单位统一选择。

BEGIN begin 设置或获取时间线在该元素上播放前的延迟时间。

BORDER border 设置或获取框架间的空间,包括3D 边框。

canHaveChildren 获取表明对象是否可以包含子对象的值。

canHaveHTML 获取表明对象是否可以包含丰富的HTML 标签的值。

CLASS className 设置或获取对象的类。

contentWindow 获取指定的frame 或iframe 的window 对象。

DA TAFLD dataFld 设置或获取由dataSrc 属性指定的绑定到指定对象的给定数据源的字段。

DA TASRC dataSrc 设置或获取用于数据绑定的数据源。

disabled 获取表明用户是否可与该对象交互的值。

END end 设置或获取表明元素结束时间的值,或者元素设置为重复的简单持续终止时间。

firstChild 获取对象的childNodes 集合的第一个子对象的引用。

FRAMEBORDER frameBorder 设置或获取是否显示框架的边框。

hasMedia 获取一个表明元素是否为HTML+TIME 媒体元素的Boolean 值。

HEIGHT height 设置或获取对象的高度。

HIDEFOCUS hideFocus 设置或获取表明对象是否显式标明焦点的值。

HSPACE hspace 设置或获取对象的水平边距。

ID id 获取标识对象的字符串。

css教程菜鸟

css教程菜鸟

css教程菜鸟CSS(层叠样式表)是一种用于描述网页上的元素布局和样式的语言,它能够使网页更加美观和易于阅读。

本文将介绍一些CSS的基础知识和常用属性,以帮助菜鸟入门。

首先,让我们了解一下CSS的基本语法。

CSS由选择器和声明块组成。

选择器指定了要应用样式的HTML元素,而声明块则包含了一系列属性-值对,用于描述要应用到元素上的样式。

下面是一个简单的示例:```p {color: red;font-size: 20px;}```上述代码中,选择器“p”表示要应用样式的HTML段落元素。

声明块中的属性-值对指定了段落的文本颜色为红色,字体大小为20像素。

接下来,我们将介绍一些常用的CSS属性。

1. 字体属性:用于设置文本的字体样式,如字体大小、字体族等。

例如:```p {font-size: 16px;font-family: Arial, sans-serif;}```上述代码将段落的字体大小设置为16像素,字体族为Arial或者sans-serif。

2. 背景属性:用于设置元素的背景样式,如背景颜色、背景图片等。

例如:```body {background-color: lightblue;background-image: url("bg.jpg");}```上述代码将页面的背景颜色设置为浅蓝色,背景图片为名为“bg.jpg”的图片。

3. 边框属性:用于设置元素的边框样式,如边框宽度、边框颜色等。

例如:```div {border: 1px solid black;}```上述代码将`<div>`元素的边框宽度设置为1像素,边框颜色为黑色。

4. 盒模型属性:用于调整元素的尺寸和定位,如元素的宽度、高度、外边距等。

例如:```img {width: 200px;height: 150px;margin-top: 10px;}```上述代码将图片的宽度设置为200像素,高度设置为150像素,并且向上外边距10像素。

CSS常用样式属性大全

CSS常用样式属性大全

CSS常用样式属性大全1. 文本属性- `color`:设置文本颜色- `font-size`:设置字体大小- `font-family`:设置字体系列- `font-weight`:设置字体粗细- `text-align`:设置文本对齐方式- `text-decoration`:设置文本装饰(如下划线、删除线等)- `text-transform`:设置文本大小写转换2. 背景属性- `background-color`:设置背景颜色- `background-image`:设置背景图片- `background-repeat`:设置背景图片的重复方式- `background-position`:设置背景图片的位置- `background-size`:设置背景图片的尺寸3. 边框属性- `border`:设置元素边框样式、宽度和颜色- `border-radius`:设置元素边框的圆角- `border-color`:设置元素边框的颜色- `border-width`:设置元素边框的宽度4. 布局属性- `display`:设置元素的显示方式(如块级、内联等)- `width`:设置元素的宽度- `height`:设置元素的高度- `margin`:设置元素外边距- `padding`:设置元素内边距- `float`:设置元素的浮动方式5. 盒模型属性- `box-sizing`:设置元素的盒模型计算方式- `overflow`:设置元素溢出内容的处理方式- `position`:设置元素的定位方式- `top`:设置定位元素的上边距- `bottom`:设置定位元素的下边距- `left`:设置定位元素的左边距- `right`:设置定位元素的右边距以上是CSS中常用的样式属性,通过合理使用这些属性可以实现各种各样的页面效果。

在编写CSS代码时,建议将样式属性单独分行展示,以增加代码的可读性和维护性。

css属性大全

css属性大全

css属性大全CSS属性大全。

CSS(Cascading Style Sheets)是一种用来为网页添加样式和布局的样式表语言。

它可以控制网页的字体、颜色、间距、边框、背景等各种样式,是网页设计中不可或缺的一部分。

在这篇文档中,我们将详细介绍CSS中的各种属性,帮助您更好地掌握CSS的应用。

1. 字体属性。

字体属性用于设置网页中文本的字体样式、大小、粗细等。

常用的属性包括font-family(设置字体系列)、font-size(设置字体大小)、font-weight(设置字体粗细)、font-style(设置字体样式)等。

2. 文本属性。

文本属性用于设置文本的对齐方式、行高、间距等。

常用的属性包括text-align(设置文本对齐方式)、line-height(设置行高)、letter-spacing(设置字符间距)、word-spacing(设置单词间距)等。

3. 背景属性。

背景属性用于设置网页元素的背景样式。

常用的属性包括background-color(设置背景颜色)、background-image(设置背景图片)、background-repeat(设置背景重复方式)、background-position(设置背景位置)等。

4. 边框属性。

边框属性用于设置网页元素的边框样式。

常用的属性包括border-width(设置边框宽度)、border-style(设置边框样式)、border-color(设置边框颜色)、border-radius(设置边框圆角)等。

5. 盒模型属性。

盒模型属性用于设置网页元素的尺寸、内边距、外边距等。

常用的属性包括width(设置元素宽度)、height(设置元素高度)、padding(设置内边距)、margin(设置外边距)等。

6. 定位属性。

定位属性用于设置网页元素的位置。

常用的属性包括position(设置定位方式)、top(设置元素顶部位置)、left(设置元素左侧位置)、z-index(设置元素层级)等。

css 总结

css 总结

css 总结CSS是网页设计中不可或缺的基础技术之一,它实现了网页的布局、样式和交互效果等方面的功能。

对于前端开发人员来说,掌握CSS 的基本知识和技巧非常重要,下面就对CSS进行一些简单的总结。

一、基本语法CSS代码由选择器和声明块组成,选择器用于确定需要应用样式的元素,而声明块则包含一个或多个属性和对应的值。

例如:```h1 {color: red;font-size: 24px;}```上面的代码使用了h1选择器,表示应用样式到网页中所有的h1元素。

花括号内是声明块,其中color和font-size是两个属性,而red和24px则是对应属性的值。

二、选择器CSS中有各种各样的选择器,用于指定需要应用样式的元素。

下面列出一些常见的选择器:- 标签选择器:根据元素的标签名来选择元素,如div、p、h1等;- 类选择器:根据元素的class属性来选择元素,用“.”加类名表示,如.class;- ID选择器:根据元素的id属性来选择元素,用“#”加id名称表示,如#id;- 伪类选择器:可以根据元素的状态来选择元素,如:hover表示当鼠标放在元素上方时的状态;- 后代选择器:可以通过两个或多个选择器的组合来选择元素,如divp表示选择div元素下的所有p元素。

三、基本样式属性CSS中有众多的样式属性,下面列出一些常用的基本样式属性:- color:设置文字的颜色,可以使用颜色名称、16进制RGB值或RGB值;- font-size:设置文字大小,可以使用像素、em、rem单位等;- background:设置元素的背景,可以设置颜色或背景图片等;- border:设置元素的边框,可以设置边框颜色、粗细和样式等;- margin:设置元素的外边距,可以设置上下左右四个方向的外边距;- padding:设置元素的内边距,可以设置上下左右四个方向的内边距。

四、盒模型CSS中的盒模型指的是网页中的元素在样式效果下所占的空间范围。

CSS中常用的五种编辑属性

CSS中常用的五种编辑属性

CSS中常⽤的五种编辑属性CSS 字体属性属性描述font 简写属性。

作⽤是把所有针对字体的属性设置在⼀个声明中。

font-family 设置字体系列。

font-size 设置字体的尺⼨。

font-style 设置字体风格。

font-variant 以⼩型⼤写字体或者正常字体显⽰⽂本。

font-weight 设置字体的粗细。

CSS ⽂本属性属性描述color 设置⽂本颜⾊direction 设置⽂本⽅向。

line-height 设置⾏⾼。

letter-spacing 设置字符间距。

text-align 对齐元素中的⽂本。

text-decoration 向⽂本添加修饰。

text-indent 缩进元素中⽂本的⾸⾏。

text-transform 控制元素中的字母。

unicode-bidi 设置⽂本⽅向。

white-space 设置元素中空⽩的处理⽅式。

word-spacing 设置字间距。

CSS 边框属性属性描述border 简写属性,⽤于把针对四个边的属性设置在⼀个声明。

border-style ⽤于设置元素所有边框的样式,或者单独地为各边设置边框样式。

border-width 简写属性,⽤于为元素的所有边框设置宽度,或者单独地为各边边框设置宽度。

border-color 简写属性,设置元素的所有边框中可见部分的颜⾊,或为 4 个边分别设置颜⾊。

border-bottom 简写属性,⽤于把下边框的所有属性设置到⼀个声明中border-left 简写属性,⽤于把左边框的所有属性设置到⼀个声明中。

border-right 简写属性,⽤于把右边框的所有属性设置到⼀个声明中。

border-top 简写属性,⽤于把上边框的所有属性设置到⼀个声明中。

CSS 列表属性(list)属性描述list-style 简写属性。

⽤于把所有⽤于列表的属性设置于⼀个声明中。

list-style-image 将图象设置为列表项标志。

CSS3常用属性大全

CSS3常用属性大全

CSS3动画属性(Animation)@keyframes//规定动画。

animation//所有动画属性的简写属性,除了animation-play-state属性。

animation-name//规定@keyframes动画的名称。

animation-duration//规定动画完成一个周期所花费的秒或毫秒。

animation-timing-function//规定动画的速度曲线。

animation-delay//规定动画何时开始。

animation-iteration-count//规定动画被播放的次数。

animation-direction//规定动画是否在下一周期逆向地播放。

animation-play-state//规定动画是否正在运行或暂停。

animation-fill-mode//规定对象动画时间之外的状态。

CSS背景属性(Background)background-attachment//设置背景图像是否固定或者随着页面的其余部分滚动。

background //在一个声明中设置所有的背景属性。

background-color //设置元素的背景颜色。

background-image //设置元素的背景图像。

background-position //设置背景图像的开始位置。

background-repeat //设置是否及如何重复背景图像。

background-clip //规定背景的绘制区域。

background-origin //规定背景图片的定位区域。

background-size //规定背景图片的尺寸。

CSS边框属性(Border和Outline)border //在一个声明中设置所有的边框属性。

border-bottom //在一个声明中设置所有的下边框属性。

border-bottom-color //设置下边框的颜色。

border-bottom-style //设置下边框的样式。

CSS属性大全

CSS属性大全

CSS属性⼤全1. ⽂字属性「字体族科」(font-family),设定时,需考虑浏览器中有⽆该字体。

「字体⼤⼩」(font-size),注意度量单位。

《绝对⼤⼩》|《相对⼤⼩》|《长度》|《百分⽐》(⼀般设置双数)「字体加粗」(font-weight),除了 normal(正常)、bold(粗体)、bolder(特粗)、lighter(细体)外,还有9种以像素为度量为单位的设置⽅式(100,200,300,400,500,600,700,800,900)。

「字体风格」(font-style),也就是字型。

(normal : 正常的字体italic : 斜体。

对于没有斜体变量的特殊字体,将应⽤obliqueoblique : 倾斜的字体)「字体变形」(font-variant),字体变形属性决定了字体显⽰是normal (普通) ,还是Small-caps(⼩型⼤写字母)当⽂字中所有字母都是⼤写的时候,⼩型⼤写字母(值)会显⽰⽐⼩写字母稍⼤的⼤写字符。

「字体」(font),《字体风格》|《字体变形》|《字体加粗》|《字体⼤⼩》|《⾏⾼》|《字体族科》2. ⽂本属性「⽂字间距」(word-spacing),主要⽤于控制⽂字间相隔的距离。

有正常(normal)和值(⾃定义间隔值)两种选择⽅式。

「字母间距」(letter-spacing),其作⽤与字符间距类似,也有正常(normal)和值(⾃定义间隔值)两种选择⽅式。

「垂直对齐」(vertical-align),控制⽂字或图像相对于其母体元素的垂直位置。

如将⼀个2×3像素的GIF图像同其母体元素⽂字的顶部垂直对齐,则该GIF图像将在该⾏⽂字的顶部显⽰。

共有基线(baseline,将元素的基准线同母体元素的基准线对齐)、下标(sub,将元素以下标的形式显⽰),上标(super,将元素以上标的形式显⽰)、顶部(top ,将元素顶部同最⾼的母体元素对齐)、⽂本顶对齐(text-top,将元素的顶部同母体元素⽂字的顶部对齐)、中线对齐(middle,将元素的中点同母体元素的中点对齐)、底部(bottom,将元素的底部同最低的母体元素对齐)及值(⾃定义)等9种选择。

CSS常用属性大全

CSS常用属性大全

CSS常用属性一 CSS文字属性:color : #999999; /*文字颜色*/font-family : 宋体,sans-serif; /*文字字体*/font-size : 9pt; /*文字大小*/font-style:itelic; /*文字斜体*/font-variant:small-caps; /*小字体*/letter-spacing : 1pt; /*字间距离*/line-height : 200%; /*设置行高*/font-weight:bold; /*文字粗体*/vertical-align:sub; /*下标字*/vertical-align:super; /*上标字*/text-decoration:line-through; /*加删除线*/text-decoration: overline; /*加顶线*/text-decoration:underline; /*加下划线*/text-decoration:none; /*删除链接下划线*/text-transform : capitalize; /*首字大写*/text-transform : uppercase; /*英文大写*/text-transform : lowercase; /*英文小写*/text-align:right; /*文字右对齐*/?text-align:left; /*文字左对齐*/text-align:center; /*文字居中对齐*/text-align:justify; /*文字分散对齐*/vertical-align属性vertical-align:top; /*垂直向上对齐*/vertical-align:bottom; /*垂直向下对齐*/vertical-align:middle; /*垂直居中对齐*/vertical-align:text-top; /*文字垂直向上对齐*/ vertical-align:text-bottom; /*文字垂直向下对齐*/ 二、CSS边框空白padding-top:10px; /*上边框留空白*/padding-right:10px; /*右边框留空白*/padding-bottom:10px; /*下边框留空白*/padding-left:10px; /*左边框留空白三、CSS符号属性list-style-type:none; /*不编号*/list-style-type:decimal; /*阿拉伯数字*/list-style-type:lower-roman; /*小写罗马数字*/list-style-type:upper-roman; /*大写罗马数字*/list-style-type:lower-alpha; /*小写英文字母*/list-style-type:upper-alpha; /*大写英文字母*/list-style-type:disc; /*实心圆形符号*/list-style-type:circle; /*空心圆形符号*/list-style-type:square; /*实心方形符号*/list-style-image:url(/; /*图片式符号*/list-style-position: outside; /*凸排*/list-style-position:inside; /*缩进*/四、CSS背景样式background-color:#F5E2EC; /*背景颜色*/?background:transparent; /*透视背景*/background-image : url(/image/; /*背景图片*/background-attachment : fixed; /*浮水印固定背景*/ background-repeat : repeat; /*重复排列-网页默认*/ background-repeat : no-repeat; /*不重复排列*/background-repeat : repeat-x; /*在x轴重复排列*/ background-repeat : repeat-y; /*在y轴重复排列*/指定背景位置background-position : 90% 90%; /*背景图片x与y轴的位置*/ background-position : top; /*向上对齐*/background-position : buttom; /*向下对齐*/background-position : left; /*向左对齐*/background-position : right; /*向右对齐*/background-position : center; /*居中对齐*/五、CSS连接属性a /*所有超链接*/a:link /*超链接文字格式*/?a:visited /*浏览过的链接文字格式*/a:active /*按下链接的格式*/a:hover /*鼠标转到链接*/鼠标光标样式:链接手指 CURSOR: hand十字体 cursor:crosshair箭头朝下 cursor:s-resize十字箭头 cursor:move箭头朝右 cursor:move加一问号 cursor:help箭头朝左 cursor:w-resize箭头朝上 cursor:n-resize箭头朝右上 cursor:ne-resize箭头朝左上 cursor:nw-resize文字I型 cursor:text箭头斜右下 cursor:se-resize箭头斜左下 cursor:sw-resize漏斗 cursor:wait光标图案(IE6)?? p {cursor:url(“光标文件名.cur”),text;} 六、CSS框线一览表border-top : 1px solid #6699cc; /*上框线*/border-bottom : 1px solid #6699cc; /*下框线*/border-left : 1px solid #6699cc; /*左框线*/?border-right : 1px solid #6699cc; /*右框线*/以上是建议书写方式,但也可以使用常规的方式如下:border-top-color : #369 /*设置上框线top颜色*/border-top-width :1px /*设置上框线top宽度*/border-top-style : solid/*设置上框线top样式*/其他框线样式solid /*实线框*/dotted /*虚线框*/double /*双线框*/groove /*立体内凸框*/ridge /*立体浮雕框*/inset /*凹框*/outset /*凸框*/七、CSS表单运用文字方块?按钮?复选框?选择钮?多行文字方块?下拉式菜单选项1选项2八、CSS边界样式margin-top:10px; /*上边界*/margin-right:10px; /*右边界值*/margin-bottom:10px; /*下边界值*/margin-left:10px; /*左边界值*/九、CSS滤镜属性?Filter:在样式中加上滤镜特效。

常用的CSS标签标记属性翻译注释

常用的CSS标签标记属性翻译注释

常用的CSS标签标记属性翻译注释这里收藏一些编写网页的常用属性,便于以后编写网页查询。

" "这里收藏一些编写网页的常用属性,便于以后编写网页查询。

1、字体属性(type)font-family(使用什么字体)font-style(字体的样式,是否斜体):normal/italic/obliquefont-variant(字体大小写):normal/small-capsfont-weight(字体的粗细):normal/bold/bolder/lithterfont-size(字体的大小):absolute-size/relative-size/length/percentage2、颜色和背景属性(backgroud)color(定义前景色,例如:p{color:red})background-color(定义背景色)background-image(定义背景图片)background-repeat(背景图案重复方式):repeat-x/repeat-y/no-repeatbackground-attachment(设置滚动):scroll(滚动)/fixe(固定的)background-position(背景图案的初始位置):percentage/length/top/left/right/bottom3、文本属性:(block)定义间距:word-spacing(单词之间的距离)letter-spacing(字母之间的距离)text-decoration(定义文字的装饰):nore/underline/overline/line-through/blinkvertical-align(元素在垂直方向的位置):baseline(基线)/sub/super/top/text-top/middle/bottom/text-bottomtext-transform(使文本转换为其它方式):capitalize(大写)/uppercase(首字母大写)/lowercase(小写)/nonetext-align(文字的对齐):left/right/center/justifytext-indent(文本的首行缩进)length/percentageline-height(文本的行高):normal/numbet/lenggth/percentage(百分比)定义超链接:a:link {color:green;text-decoration:nore}(未访问过的状态)a:visited {color:ren;text-decoration:underline;16pt}(访问过的状态)a:hover {color:blue;text-decoration:underline;16pt}(鼠标激活的状态)4、块属性(block)边距属性:margin-top(设置顶边距)margin-right(设置右边距)margin-bottom(设置底边距)margin-left(设置左边距)填充距属性:padding-top设置顶端真充距)padding-right设置顶端真充距)padding-bottom设置顶端真充距)padding-left设置顶端真充距)5、边框属性(border)border-top-width(顶端边框宽度)border-right-width(右端边框宽度)border-bottom-width(底端边框宽度)border-left-width(d左边框宽度)border-width(一次定义边框宽度)border-color(设置边框颜色)border-style(设置边框样式)border-top(一次定义顶端各种属性)border-right(一次定义右端各种属性)border-bottom(一次定义底端各种属性)border-left(一次定义左端各种属性)图文混排:width(定义宽度属性)height(定义高度属性)float(文字环绕在一个元素的四周)clear(定义某一边是否有环绕)6、项目符号和编号(list)display(定义是否显示)white-space(怎样处理空白部分):normal/pre/nowraplist-style-type(在列表前加项目符号)disc(圆点)/circle(圈)/square(方形)/decimal(阿拉伯数字)/lower-roman(小写罗马数字)/upper-roman(大写罗马数字)/lower-alpha(小写英文字母)/upper-alpha(大写英文字母)/norelist-style-tyle(在列表前加图案):<url>/nonelist-style-position(决定列表项中第二行的起邕位置)list-style(一次性定义所有属性)7、定位(positioning)即层属性Type:设定对象的定位方式。

CSS标签属性大全

CSS标签属性大全

c s s样式大全(整‎理版)字体属性:(‎f ont)大小‎{font-size‎: x-large;‎}(特大) xx-s‎m all;(极小) ‎一般中文用不到,只要‎用数值就可以,单位‎:PX、PD样式‎{font-sty‎l e: obliqu‎e;}(偏斜体) i‎t alic;(斜体)‎normal;(正‎常)行高 {li‎n e-height:‎normal;}(‎正常) 单位:PX、‎P D、EM粗细‎{font-weig‎h t: bold;}‎(粗体) light‎e r;(细体) no‎r mal;(正常) ‎变体 {font-‎v ariant: s‎m all-caps;‎}(小型大写字母) ‎n ormal;(正常‎)大小写 {te‎x t-transfo‎r m: capita‎l ize;}(首字母‎大写) upperc‎a se;(大写) l‎o wercase;(‎小写) none;(‎无)修饰 {te‎x t-decorat‎i on: under‎l ine;}(下划线‎) overline‎;(上划线) lin‎e-through;‎(删除线) blin‎k;(闪烁)常用‎字体: (font-‎f amily)"Co‎u rier New"‎, Courier,‎monospace‎, "Times ‎New Roman‎", Times, ‎s erif, Ari‎a l, Helvet‎i ca, sans-‎s erif, Ve r‎d a n a背景属‎性:(backgro‎u nd)色彩 {‎b ackground‎-color: #F‎F FFFF;}图‎片 {backgro‎u nd-image:‎url();}‎重复 {backgr‎o und-repea‎t: no-repe‎a t;}滚动 {‎b ackground‎-attachmen‎t: fixed;}‎(固定) scrol‎l;(滚动)位置‎{backgrou‎n d-positio‎n: left;}(‎水平) top(垂直‎);简写方法 {‎b ac kgr oun d‎:#000 ur l(‎..) rep eat‎fi xed le f‎t top;} /*‎简写·这个在阅读代码‎中经常出现,要认真的‎研究*/区块属性:‎(Block) /‎*这个属性第一次认识‎,要多多研究*/ ‎字间距 {lett‎e r-spacing‎: normal;}‎数值 /*这个属性‎似乎有用,多实践下*‎/对齐 {tex‎t-align: j‎u stify;}(两‎端对齐) left;‎(左对齐) righ‎t;(右对齐) ce‎n ter;(居中) ‎缩进 {text-‎i ndent: 数值‎p x;}垂直对齐‎{vertical‎-align: ba‎s eline;}(基‎线) sub;(下标‎)super;(下‎标) top; te‎x t-top; mi‎d dle; bott‎o m; text-b‎o ttom;词间‎距word-spac‎i ng: norma‎l; 数值空格‎w hite-spac‎e: pre;(保留‎) nowrap;(‎不换行)显示‎{display:‎b lock;}(块)‎inline;(内‎嵌) list-it‎e m;(列表项) r‎u n-in;(追加部‎分) compact‎;(紧凑) mark‎e r;(标记) ta‎b le; inlin‎e-tableta‎b le-raw-gr‎o up; table‎-header-gr‎o up; table‎-footer-gr‎o up; table‎-raw; tabl‎e-column-g‎r oup; tabl‎e-column; ‎t able-cell‎;table-ca‎p tion;(表格标‎题) /*displ‎a y 属性的了解很模‎糊*/方‎框属性: (Box)‎ width:; ‎h eight:; f‎l oat:; cle‎a r:both; m‎a rgin:; pa‎d ding:;顺序‎:上右下左边框属‎性: (Border‎) border-‎s tyle: dot‎t ed;(点线) d‎a shed;(虚线)‎solid; do‎u ble;(双线) ‎g roove;(槽线‎)ridge;(脊‎状) inset;(‎凹陷) outset‎;border-w‎i dth:; 边框宽‎度 border-c‎o lor:#; 简‎写方法border:‎w idth styl‎e color; /‎*简写*/列表属性‎:(List-st‎y le) 类型li‎s t-style-t‎y pe: disc;‎(圆点) circl‎e;(圆圈) squ‎a re;(方块) ‎d ecimal;(数‎字) lower-r‎o man;(小罗码数‎字) upper-r‎o man; lowe‎r-alpha; u‎p per-alpha‎;位置list‎-style-pos‎i tion: out‎s ide;(外) i‎n side;图像‎l ist-style‎-image: ur‎l(..);定‎位属性: (Posi‎t ion) Pos‎i tion: abs‎o lute; rel‎a tive; sta‎t ic; visib‎i lity: inh‎e rit; visi‎b le; hidde‎n; overflo‎w: visible‎;hidden; ‎s croll; au‎t o; clip: ‎r ect(12px,‎a uto,12px,‎a uto) (裁切)‎css属性代码大全‎一 CSS文字属性‎:color ‎: #999999;‎/*文字颜色*/ ‎font-fam‎i ly : 宋体,s‎a ns-serif;‎/*文字字体*/ ‎font-siz‎e : 9pt; /‎*文字大小*/‎f ont-style‎:itelic; /‎*文字斜体*/ ‎font-vari‎a nt:small-‎c aps; /*小字‎体*/lett‎e r-spacing‎: 1pt; /*‎字间距离*/l‎i ne-height‎: 200%; /‎*设置行高*/‎f ont-weigh‎t:bold; /*‎文字粗体*/v‎e rtical-al‎i gn:sub; /‎*下标字*/v‎e rtical-al‎i gn:super;‎/*上标字*/ ‎text-dec‎o ration:li‎n e-through‎; /*加删除线*/‎text-de‎c oration: ‎o verline; ‎/*加顶线*/‎t ext-decor‎a tion:unde‎r line; /*加‎下划线*/te‎x t-decorat‎i on:none; ‎/*删除链接下划线*‎/text-t‎r ansform :‎capitaliz‎e; /*首字大写*‎/text-t‎r ansform :‎uppercase‎; /*英文大写*/‎text-tr‎a nsform : ‎l owercase;‎/*英文小写*/ ‎text-ali‎g n:right; ‎/*文字右对齐*/ ‎text-ali‎g n:left; /‎*文字左对齐*/ ‎text-ali‎g n:center;‎/*文字居中对齐*‎/text-a‎l ign:justi‎f y; /*文字分散‎对齐*/ver‎t ical-alig‎n属性vert‎i cal-align‎:top; /*垂直‎向上对齐*/v‎e rtical-al‎i gn:bottom‎; /*垂直向下对齐‎*/verti‎c al-align:‎m iddle; /*‎垂直居中对齐*/ ‎vertical‎-align:tex‎t-top; /*文‎字垂直向上对齐*/ ‎vertical‎-align:tex‎t-bottom; ‎/*文字垂直向下对齐‎*/二、CSS‎边框空白pad‎d ing-top:1‎0px; /*上边框‎留空白*/pa‎d ding-righ‎t:10px; /*‎右边框留空白*/ ‎padding-b‎o ttom:10px‎; /*下边框留空白‎*/paddi‎n g-left:10‎p x; /*左边框留‎空白三、CSS符‎号属性:lis‎t-style-ty‎p e:none; /‎*不编号*/‎l ist-style‎-type:deci‎m al; /*阿拉伯‎数字*/li‎s t-style-t‎y pe:lower-‎r oman; /*小‎写罗马数字*/‎l ist-style‎-type:uppe‎r-roman; /‎*大写罗马数字*/ ‎list-sty‎l e-type:lo‎w er-alpha;‎/*小写英文字母*‎/list-s‎t yle-type:‎u pper-alph‎a; /*大写英文字‎母*/list‎-style-typ‎e:disc; /*‎实心圆形符号*/ ‎list-styl‎e-type:cir‎c le; /*空心圆‎形符号*/li‎s t-style-t‎y pe:square‎; /*实心方形符号‎*/list‎-style-ima‎g e:url(/do‎t.gif); /*‎图片式符号*/‎l ist-style‎-position:‎outside; ‎/*凸排*/l‎i st-style-‎p osition:i‎n side; /*缩‎进*/四、CS‎S背景样式:b‎a ckground-‎c olor:#F5E‎2EC; /*背景颜‎色*/back‎g round:tra‎n sparent; ‎/*透视背景*/ ‎backgrou‎n d-image :‎url(/imag‎e/bg.gif);‎/*背景图片*/ ‎backgrou‎n d-attachm‎e nt : fixe‎d; /*浮水印固定‎背景*/bac‎k ground-re‎p eat : rep‎e at; /*重复排‎列-网页默认*/ ‎backgroun‎d-repeat :‎no-repeat‎; /*不重复排列*‎/backgr‎o und-repea‎t : repeat‎-x; /*在x轴重‎复排列*/ba‎c kground-r‎e peat : re‎p eat-y; /*‎在y轴重复排列*/ ‎指定背景位置‎backgroun‎d-position‎: 90% 90%‎; /*背景图片x与‎y轴的位置*/ ‎b ackground‎-position ‎: top; /*向‎上对齐*/ba‎c kground-p‎o sition : ‎b uttom; /*‎向下对齐*/b‎a ckground-‎p osition :‎left; /*向‎左对齐*/ba‎c kground-p‎o sition : ‎r ight; /*向‎右对齐*/ba‎c kground-p‎o sition : ‎c enter; /*‎居中对齐*/五‎、CSS连接属性:‎a /*所有超链接‎*/a:li‎n k /*超链接文字‎格式*/a:v‎i sited /*浏‎览过的链接文字格式*‎/a:acti‎v e /*按下链接的‎格式*/a:h‎o ver /*鼠标转‎到链接*/鼠标‎光标样式:链接手‎指 CURSOR: ‎h and十字体‎cursor:cr‎o sshair‎箭头朝下 curso‎r:s-resize‎十字箭头 cu‎r sor:move ‎箭头朝右 cur‎s or:move ‎加一问号 curs‎o r:help ‎箭头朝左 curs‎o r:w-resiz‎e箭头朝上 c‎u rsor:n-re‎s ize箭头朝‎右上 cursor:‎n e-resize ‎箭头朝左上 cu‎r sor:nw-re‎s ize文字I‎型 cursor:t‎e xt箭头斜‎右下 cursor:‎s e-resize ‎箭头斜左下 cu‎r sor:sw-re‎s ize漏斗‎c ursor:wai‎t光标图案(‎I E6) p {‎c ursor:url‎("光标文件名.cu‎r"),text;}‎六、CSS框线‎一览表:bor‎d er-top : ‎1px solid ‎#6699cc; /‎*上框线*/b‎o rder-bott‎o m : 1px s‎o lid #6699‎c c; /*下框线*‎/border‎-left : 1p‎x solid #6‎699cc; /*左‎框线*/bor‎d er-right ‎: 1px soli‎d #6699cc;‎/*右框线*/ ‎以上是建议书写方式‎,但也可以使用常规的‎方式如下:bo‎r der-top-c‎o lor : #36‎9 /*设置上框线t‎o p颜色*/b‎o rder-top-‎w idth :1px‎/*设置上框线to‎p宽度*/bo‎r der-top-s‎t yle : sol‎i d/*设置上框线t‎o p样式*/其‎他框线样式so‎l id /*实线框*‎/dotted‎/*虚线框*/ ‎double /*‎双线框*/g‎r oove /*立体‎内凸框*/ri‎d ge /*立体浮雕‎框*/inse‎t /*凹框*/ ‎outset /*‎凸框*/七、C‎S S表单运用:文‎字方块按钮‎复选框选择钮‎多行文字方块‎下拉式菜单‎选项1选项2八‎、CSS边界样式:‎margin-to‎p:10px; /*‎上边界*/m‎a rgin-righ‎t:10px; /*‎右边界值*/m‎a rgin-bott‎o m:10px; /‎*下边界值*/‎m argin-lef‎t:10px; /*‎左边界值*/ ‎CSS 属性:字‎体样式(Font S‎t yle)序号‎中文说明标记语法‎1 字体样式‎{font:fon‎t-style fo‎n t-variant‎font-weig‎h t font-si‎z e font-fa‎m ily}2 ‎字体类型 {fo‎n t-family:‎"字体1","字体2‎","字体3",..‎.}3 字体大‎小 {font-‎s ize:数值|in‎h erit| med‎i um| large‎| larger| ‎x-large| x‎x-large| s‎m all| smal‎l er| x-sma‎l l| xx-sma‎l l}4 字体‎风格 {font‎-style:inh‎e rit|itali‎c|normal|o‎b lique}‎5字体粗细‎{font-wei‎g ht:100-90‎0|bold|bol‎d er|lighte‎r|normal;}‎6 字体颜色‎ {color:‎数值;}7 阴‎影颜色 { tex‎t-shadow:1‎6位色值}8 ‎字体行高 {‎l ine-heigh‎t:数值|inher‎i t|normal;‎}9 字间‎距 {let‎t er-spacin‎g:数值|inher‎i t|normal}‎10 单词间距‎ {word-s‎p acing:数值|‎i nherit|no‎r mal}11‎字体变形 {f‎o nt-varian‎t:inherit|‎n ormal|sma‎l l-cps } ‎12 英文转换‎{text-tran‎s form:inhe‎r it|none|c‎a pitalize|‎u ppercase|‎l owercase}‎13 字体变形‎ {font-s‎i ze-adjust‎:inherit|n‎o ne}14字‎体{font-st‎r etch:cond‎e nsed|expa‎n ded|extra‎-condensed‎|extra-exp‎a nded|inh‎e rit|narro‎w er|normal‎|semi-c‎o ndensed|s‎e mi-expand‎e d|ultra-c‎o ndensed|u‎l tra-expan‎d ed|wider}‎文本样式(Te‎x t Style) ‎序号中文说明‎标记语法1 行‎间距 {li‎n e-height:‎数值|inherit‎|normal;} ‎2 文本修饰 {‎t ext-decor‎a tion:inhe‎r it|none|u‎n derline|o‎v erline|li‎n e-through‎|blink} ‎3段首空格 {‎t ext-inden‎t:数值|inher‎i t}4 水平‎对齐 {text‎-align:lef‎t|right|ce‎n ter|justi‎f y}5 垂直‎对齐{vertic‎a l-align:i‎n herit|top‎|bottom|te‎x t-top|tex‎t-bottom|b‎a seline|mi‎d dle|sub|s‎u p er}6 ‎书写方式 {wr‎i ting-mode‎:lr-tb|tb-‎r l}背景样式‎序号中文说明‎标记语法1 背‎景颜色 {bac‎k ground-co‎l or:数值}‎2背景图片 {‎b ackground‎-image: ur‎l(URL)|non‎e}3 背景重‎复 {backgr‎o und-repea‎t:inherit|‎n o-repeat|‎r epeat|rep‎e at-x|repe‎a t-y}4 ‎背景固定 {ba‎c kground-a‎t tachment:‎f ixed|scro‎l l}5 背景‎定位 {back‎g round-pos‎i tion:数值|t‎o p|bottom|‎l eft|right‎|center} ‎6 背影样式‎{backgroun‎d:背景颜色|背景图‎象|背景重复|背景附‎件|背景位置}框架‎样式(Box Sty‎l e)序号中‎文说明标记语法‎1 边界留白‎{margin:ma‎r gin-top m‎a rgin-righ‎t margin-b‎o ttom marg‎i n-left} ‎2 补白‎{padding:p‎a dding-top‎padding-r‎i ght paddi‎n g-bottom ‎p adding-le‎f t}3 边框‎宽度{bor‎d er-width:‎b order-top‎-width bor‎d er-right-‎w idth bord‎e r-bottom-‎w idth bord‎e r-left-wi‎d th} 宽度‎值: thin|me‎d ium|thick‎|数值4 边框‎颜色 {bord‎e r-color:数‎值数值数值数值‎}数值:分别代表‎t op、right、‎b ottom、lef‎t颜色值5 边‎框风格{bord‎e r-style:n‎o ne|hidden‎|inherit|d‎a shed|soli‎d|double|i‎n set|outse‎t|ridge|gr‎o ove}6 边‎框 {bord‎e r:border-‎w idth bord‎e r-style c‎o lor}上边‎框{border-‎t op:border‎-top-width‎border-st‎y le color}‎右边框‎ {border-‎r ight:bord‎e r-right-w‎i dth borde‎r-style co‎l or}下‎边框 {bor‎d er-bottom‎:border-bo‎t tom-width‎border-st‎y le color}‎左边框‎ {border-‎l eft:borde‎r-left-wid‎t h border-‎s tyle colo‎r}7 宽‎度 {width‎:长度|百分比| a‎u to}8 高‎度 {hei‎g ht:数值|aut‎o}9 漂‎浮 {float‎:left|righ‎t|none}‎10 清除‎{clear:non‎e|left|rig‎h t|both}‎分类列表序号中文‎说明标记语法‎1 控制显示 {d‎i splay:non‎e|block|in‎l ine|list-‎i tem}2 ‎控制空白 {whit‎e-space:no‎r mal|pre|n‎o warp}3‎符号列表{lis‎t-style-ty‎p e:disc|ci‎r cle|squar‎e|decimal|‎l ower-roma‎n|upper-ro‎m an|lower-‎a lpha |uppe‎r-alpha|no‎n e}4 图形‎列表 {list‎-style-ima‎g e:URL}‎5位置列表 {‎l ist-style‎-position:‎i nside|out‎s ide}6 ‎目录列表 {li‎s t-style:目‎录样式类型|目录样式‎位置|url}‎7鼠标形状{c‎u rsor:hand‎|crosshair‎|text|wait‎|move|help‎|e-resize|‎n w-resize|‎w-resize|s‎-resize |se‎-resize|sw‎-resize}‎。

常用的CSS属性的英文单词总结及用法、解释

常用的CSS属性的英文单词总结及用法、解释
padding -内边界:确定围绕块元素的空格填充数量,其中包含4个属性“padding-top控制上留白的宽度、padding-right控制右留白的宽度、padding-bottom控制下留白宽度、padding-left控制左留白的宽度。
2、边框
border-width -宽 :控制边框的宽度,其中分为4个属性:border-top-width顶边框的宽度、border-right-width右边框的宽度、border-bottom-width底边框的宽度、border-left-width左边框的宽度。
blue 蓝色 bug 软件程序中的错误
body 主体,一个HTML 标记 building 建立
bold 粗体 button 按钮
anchor 锚记<a>标记是这个单词的缩写 anchor 锚记<a>标记是这个单词的缩写
arrow 箭头 arrow 箭头
auto 自动 auto 自动
text-align - 文本对齐:设置块的水平对齐方式。共有左对齐(left)、右对齐(right)、居中(center)和均分(justify)等4种选择。
text-indent - 文字缩进:控制块的缩进程度。
white-space -空白间距:在HTML中,空格是被省略的;在CSS中则使用属性(white-space)控制空格的输入。共有正常(normal)、保留(pre)和不换行(nowrap)等3种选择。
B
background 背景 border 边框
banner 页面上的一个横条 both 二者都是clear 属性的一个属性值
background-attachment - 附加:用于控制背景图像是否会随页面的滚动而一起滚动。有固定(fixd,文字滚动时,背景图像保质固定)和滚动(scroll,背景图像随文字内容一起滚动)两种选择。

css常用代码大全

css常用代码大全

字体属性:(font)大小{font-size: x-large;}(特大) xx-small;(极小) 一般中文用不到,只要用数值就可以,单位:PX、PD样式{font-style: oblique;}(偏斜体) italic;(斜体) normal;(正常)行高{line-height: normal;}(正常) 单位:PX、PD、EM粗细{font-weight: bold;}(粗体) lighter;(细体) normal;(正常)变体{font-variant: small-caps;}(小型大写字母) normal;(正常)大小写{text-transform: capitalize;}(首字母大写) uppercase;(大写) lowercase;(小写)none;(无)修饰{text-decoration: underline;}(下划线) overline;(上划线) line-through;(删除线)blink;(闪烁)常用字体:(font-family)"Courier New", Courier, monospace, "Times New Roman", Times, serif, Arial, Helvetica, sans-serif, Verdana背景属性:(background)色彩{background-color: #FFFFFF;}图片{background-image: url();}重复{background-repeat: no-repeat;}滚动{background-attachment: fixed;}(固定) scroll;(滚动)位置{background-position: left;}(水平) top(垂直);简写方法{background:#000 url(..) repeat fixed left top;} /*简写·这个在阅读代码中经常出现,要认真的研究*/区块属性:(Block) /*这个属性第一次认识,要多多研究*/字间距{letter-spacing: normal;} 数值/*这个属性似乎有用,多实践下*/对齐{text-align: justify;}(两端对齐) left;(左对齐) right;(右对齐) center;(居中)缩进{text-indent: 数值px;}垂直对齐{vertical-align: baseline;}(基线) sub;(下标) super;(下标) top; text-top; middle; bottom; text-bottom;词间距word-spacing: normal; 数值空格white-space: pre;(保留) nowrap;(不换行)显示{display:block;}(块) inline;(内嵌) list-item;(列表项) run-in;(追加部分) compact;(紧凑) marker;(标记) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; table-column; table-cell;table-caption;(表格标题) /*display 属性的了解很模糊*/width:; height:; float:; clear:both; margin:; padding:; 顺序:上右下左边框属性:(Border)border-style: dotted;(点线) dashed;(虚线) solid(实线); double;(双线) groove;(槽线)ridge;(脊状) inset;(凹陷) outset;border-width:; 边框宽度border-color:#;简写方法border:width style color; /*简写*/列表属性:(List-style)类型list-style-type: disc;(圆点) circle;(圆圈) square;(方块) decimal;(数字) lower-roman;(小罗码数字) upper-roman; lower-alpha; upper-alpha;位置list-style-position: outside;(外) inside;图像list-style-image: url(..);定位属性:(Position)Position: absolute; relative; static;visibility: inherit; visible; hidden;overflow: visible; hidden; scroll; auto;clip: rect(12px,auto,12px,auto) (裁切)css属性代码大全color : #999999; /*文字颜色*/font-family : 宋体,sans-serif; /*文字字体*/ font-size : 9pt; /*文字大小*/font-style:itelic; /*文字斜体*/font-variant:small-caps; /*小字体*/letter-spacing : 1pt; /*字间距离*/line-height : 200%; /*设置行高*/font-weight:bold; /*文字粗体*/vertical-align:sub; /*下标字*/vertical-align:super; /*上标字*/text-decoration:line-through; /*加删除线*/ text-decoration: overline; /*加顶线*/text-decoration:underline; /*加下划线*/ text-decoration:none; /*删除链接下划线*/ text-transform : capitalize; /*首字大写*/ text-transform : uppercase; /*英文大写*/ text-transform : lowercase; /*英文小写*/ text-align:right; /*文字右对齐*/text-align:left; /*文字左对齐*/text-align:center; /*文字居中对齐*/text-align:justify; /*文字分散对齐*/vertical-align属性vertical-align:top; /*垂直向上对齐*/vertical-align:bottom; /*垂直向下对齐*/vertical-align:middle; /*垂直居中对齐*/vertical-align:text-top; /*文字垂直向上对齐*/ vertical-align:text-bottom; /*文字垂直向下对齐*/ 二、CSS边框空白padding-top:10px; /*上边框留空白*/padding-right:10px; /*右边框留空白*/padding-bottom:10px; /*下边框留空白*/ padding-left:10px; /*左边框留空白三、CSS符号属性:list-style-type:none; /*不编号*/list-style-type:decimal; /*阿拉伯数字*/list-style-type:lower-roman; /*小写罗马数字*/ list-style-type:upper-roman; /*大写罗马数字*/ list-style-type:lower-alpha; /*小写英文字母*/list-style-type:upper-alpha; /*大写英文字母*/ list-style-type:disc; /*实心圆形符号*/list-style-type:circle; /*空心圆形符号*/list-style-type:square; /*实心方形符号*/list-style-image:url(/dot.gif); /*图片式符号*/list-style-position: outside; /*凸排*/list-style-position:inside; /*缩进*/四、CSS背景样式:background-color:#F5E2EC; /*背景颜色*/background:transparent; /*透视背景*/background-image : url(/image/bg.gif); /*背景图片*/ background-attachment : fixed; /*浮水印固定背景*/ background-repeat : repeat; /*重复排列-网页默认*/ background-repeat : no-repeat; /*不重复排列*/ background-repeat : repeat-x; /*在x轴重复排列*/ background-repeat : repeat-y; /*在y轴重复排列*/指定背景位置background-position : 90% 90%; /*背景图片x与y轴的位置*/ background-position : top; /*向上对齐*/background-position : buttom; /*向下对齐*/background-position : left; /*向左对齐*/background-position : right; /*向右对齐*/background-position : center; /*居中对齐*/五、CSS连接属性:a /*所有超链接*/a:link /*超链接文字格式*/a:visited /*浏览过的链接文字格式*/a:active /*按下链接的格式*/a:hover /*鼠标转到链接*/鼠标光标样式:链接手指CURSOR: hand十字体cursor:crosshair箭头朝下cursor:s-resize十字箭头cursor:move箭头朝右cursor:move加一问号cursor:help箭头朝左cursor:w-resize箭头朝上cursor:n-resize箭头朝右上cursor:ne-resize箭头朝左上cursor:nw-resize文字I型cursor:text箭头斜右下cursor:se-resize箭头斜左下cursor:sw-resize漏斗cursor:wait光标图案(IE6) p {cursor:url("光标文件名.cur"),text;} 六、CSS框线一览表:border-top : 1px solid #6699cc; /*上框线*/border-bottom : 1px solid #6699cc; /*下框线*/ border-left : 1px solid #6699cc; /*左框线*/border-right : 1px solid #6699cc; /*右框线*/以上是建议书写方式,但也可以使用常规的方式如下: border-top-color : #369 /*设置上框线top颜色*/ border-top-width :1px /*设置上框线top宽度*/ border-top-style : solid/*设置上框线top样式*/其他框线样式solid /*实线框*/dotted /*虚线框*/double /*双线框*/groove /*立体内凸框*/ridge /*立体浮雕框*/inset /*凹框*/outset /*凸框*/七、CSS表单运用:文字方块按钮复选框选择钮多行文字方块下拉式菜单选项1选项2八、CSS边界样式:margin-top:10px; /*上边界*/margin-right:10px; /*右边界值*/margin-bottom:10px; /*下边界值*/margin-left:10px; /*左边界值*/CSS 属性:字体样式(Font Style)序号中文说明标记语法1 字体样式{font:font-style font-variant font-weight font-size font-family}2 字体类型{font-family:"字体1","字体2","字体3",...}3 字体大小{font-size:数值|inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-small}4 字体风格{font-style:inherit|italic|normal|oblique}5 字体粗细{font-weight:100-900|bold|bolder|lighter|normal;}6 字体颜色{color:数值;}7 阴影颜色{text-shadow:16位色值}8 字体行高{line-height:数值|inherit|normal;}9 字间距{letter-spacing:数值|inherit|normal}10 单词间距{word-spacing:数值|inherit|normal}11 字体变形{font-variant:inherit|normal|small-cps }12 英文转换{text-transform:inherit|none|capitalize|uppercase|lowercase}13 字体变形{font-size-adjust:inherit|none}14 字体{font-stretch:condensed|expanded|extra-condensed|extra- expanded|inherit|narrower|normal| semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}文本样式(Text Style)序号中文说明标记语法1 行间距{line-height:数值|inherit|normal;}2 文本修饰{text-decoration:inherit|none|underline|overline|line-through|blink}3 段首空格{text-indent:数值|inherit}4 水平对齐{text-align:left|right|center|justify}5 垂直对齐{vertical-align:inherit|top|bottom|text-top|text-bottom|baseline|middle|sub|super}6 书写方式{writing-mode:lr-tb|tb-rl}背景样式序号中文说明标记语法1 背景颜色{background-color:数值}2 背景图片{background-image: url(URL)|none}3 背景重复{background-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}4 背景固定{background-attachment:fixed|scroll}5 背景定位{background-position:数值|top|bottom|left|right|center}6 背影样式{background:背景颜色|背景图象|背景重复|背景附件|背景位置}框架样式(Box Style)序号中文说明标记语法1 边界留白{margin:margin-top margin-right margin-bottom margin-left}2 补白{padding:padding-top padding-right padding-bottompadding-left}3 边框宽度{border-width:border-top-width border-right-width border-bottom-widthborder-left-width}宽度值:thin|medium|thick|数值4 边框颜色{border-color:数值数值数值数值} 数值:分别代表top、right、bottom、left颜色值5 边框风格{border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}6 边框{border:border-width border-style color}上边框{border-top:border-top-width border-style color}右边框{border-right:border-right-width border-style color}下边框{border-bottom:border-bottom-width border-style color}左边框{border-left:border-left-width border-style color}7 宽度{width:长度|百分比| auto}8 高度{height:数值|auto}9 漂浮{float:left|right|none}10 清除{clear:none|left|right|both}分类列表序号中文说明标记语法1 控制显示{display:none|block|inline|list-item}2 控制空白{white-space:normal|pre|nowarp}3 符号列表{list-style-type:disc|circle|square|decimal|lower-roman|upper- roman|lower-alpha|upper-alpha|none}4 图形列表{list-style-image:URL}5 位置列表{list-style-position:inside|outside}6 目录列表{list-style:目录样式类型|目录样式位置|url}7 鼠标形状{cursor:hand|crosshair|text|wait|move|help|e-resize|nw-resize|w- resize|s-resize|se-resize|sw-resize}CSS属性大全[背景]属性共有六项:「背景颜色」(background-color),设置背景颜色。

常用css样式

常用css样式

常用css样式常用CSS样式CSS是一种用于网页设计的样式表语言,它可以为网页添加样式和布局,使其看起来更美观和易于导航。

以下是常用的CSS样式。

一、文本样式1.字体大小使用font-size属性可以设置文本的大小,单位可以是像素(px)、百分比(%)或em。

例如:p {font-size: 16px;}2.字体颜色使用color属性可以设置文本的颜色,可以使用颜色名称或十六进制值。

例如:p {color: red;}3.字体样式使用font-style属性可以设置文本的样式,包括normal(默认)、italic(斜体)和oblique(倾斜)。

例如:p {font-style: italic;}4.字体粗细使用font-weight属性可以设置文本的粗细程度,包括normal(默认)、bold(加粗)和lighter(细)。

例如:p {font-weight: bold;}5.行高使用line-height属性可以设置文本行与行之间的距离。

例如:p {line-height: 1.5;}二、背景样式1.背景颜色使用background-color属性可以设置元素的背景颜色,可以使用颜色名称或十六进制值。

例如:div {background-color: #f0f0f0;}2.背景图片使用background-image属性可以为元素添加背景图片,可以使用相对或绝对路径。

例如:div {background-image: url("bg.jpg");}3.背景重复使用background-repeat属性可以设置背景图片的重复方式,包括repeat(默认)、repeat-x、repeat-y和no-repeat。

例如:div {background-repeat: no-repeat;}4.背景位置使用background-position属性可以设置背景图片的位置,可以使用关键字(如top、bottom、left和right)或像素值。

CSS中的定位属性有哪些各自的特点是什么

CSS中的定位属性有哪些各自的特点是什么

CSS中的定位属性有哪些各自的特点是什么在网页设计和开发中,CSS(层叠样式表)的定位属性是非常重要的一部分。

它们允许我们精确地控制元素在页面上的位置和布局,从而实现各种复杂而精美的设计效果。

CSS 中的定位属性主要包括静态定位(static)、相对定位(relative)、绝对定位(absolute)和固定定位(fixed)。

接下来,让我们详细了解一下它们各自的特点。

一、静态定位(static)静态定位是 CSS 中元素的默认定位方式。

当一个元素被设置为静态定位时,它会按照正常的文档流进行布局,就好像没有应用任何定位属性一样。

这意味着元素会从上到下、从左到右依次排列,并且其位置不会受到 top、bottom、left、right 等属性的影响。

静态定位的特点主要有以下几点:1、简单和自然:它遵循了 HTML 文档的默认布局规则,不需要额外的设置,适用于大多数常规的页面布局。

2、不受定位属性控制:即使为静态定位的元素设置了 top、bottom、left、right 等属性,这些属性也不会生效。

二、相对定位(relative)相对定位是指元素相对于其在正常文档流中的位置进行偏移。

也就是说,它原本在文档流中所占的空间仍然保留,其他元素的布局不会受到影响,只是该元素自身的位置发生了改变。

相对定位的特点包括:1、保留原有空间:相对定位的元素在移动位置后,其原来在文档流中占据的空间不会被其他元素填充。

2、可使用偏移属性:通过设置 top、bottom、left、right 属性来实现元素在垂直和水平方向上的偏移。

例如,设置 top: 20px 会使元素相对于其原来的位置向下移动 20 像素。

3、可作为定位基准:当一个元素的子元素需要进行绝对定位时,相对定位的父元素可以作为子元素的定位基准。

三、绝对定位(absolute)绝对定位的元素会完全脱离正常的文档流,不再占据页面上的空间,其他元素会忽略它原来的位置进行布局。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CSS常用属性大全
2011-04-22 12:51
字体属性:(font)
大小 font-size: x-large;(特大) xx-small;(极小) 一般中文用不到,只要用数值就可以,单位:PX、PD
样式 font-style: oblique;(偏斜体) italic;(斜体) normal;(正常)行高 line-height: normal;(正常) 单位:PX、PD、EM
粗细 font-weight: bold;(粗体) lighter;(细体) normal;(正常)
变体 font-variant: small-caps;(小型大写字母) normal;(正常)
大小写 text-transform: capitalize;(首字母大写) uppercase;(大写) lowercase;(小写) none;(无)
修饰 text-decoration: underline;(下划线) overline;(上划线)
line-through;(删除线) blink;(闪烁)
字体投影效果:filter:dropshadow(color=#FFFFFF, offx=1, offy=1, positive=1);
背景属性: (background)
色彩background-color: #FFFFFF;
图片background-image: url();
重复background-repeat: repeat; no-repeat; repeat-x; repeat-y;滚动background-attachment: fixed;(固定) scroll;(滚动)
位置background-position: left(水平) top(垂直);bottom; right; center;
简写方法 background:#000 url(..) repeat fixed left top;
区块属性: (Block)
字间距letter-spacing: normal; 数值
对齐text-align: justify;(两端对齐) left;(左对齐) right;(右对齐) center;(居中)
缩进text-indent: 数值px;
垂直对齐vertical-align: baseline;(基线) sub;(下标) super;(下标) top; text-top; middle; bottom; text-bottom;
单词间距word-spacing: normal; 数值
空格white-space: pre;(保留) nowrap;(不换行)
显示display:block;(块) inline;(内嵌) list-item;(列表项) run-in;(追加部分) compact;(紧凑) marker;(标记) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; table-column; table-cell; table-caption;(表格标题)
方框属性: (Box)
width:; height:; float:; clear:both; margin:; padding:; 顺序:上右下左
边框属性: (Border / border-top / border-right / border-bottom / border-left)
border-style: dotted;(点线) dashed;(虚线) solid; double;(双线) groove;(槽线) ridge;(脊状) inset;(凹陷) outset;
border-width:; 边框宽度
border-color:#;
简写方法border:width style color;
列表属性: (List-style)
类型list-style-type: disc;(圆点) circle;(圆圈) square;(方块) decimal;(数字) lower-roman;(小罗码数字) upper-roman; lower-alpha; upper-alpha;
位置list-style-position: outside;(外) inside;
图像list-style-image: url(..);
定位属性: (Position)
Position(定位): absolute(绝对); relative(相对);
static(静态);
visibility(可见性): inherit(继承); visible(可见);
hidden(隐藏);
overflow(溢出): visible(可见); hidden(隐藏); scroll(滚动); auto(自动);
clip(裁切): rect(12px,auto,12px,auto)
CSS连接属性:a:link (超链接格式); a:visited (浏览过的);
a:active (按下去的);a:hover(鼠标转到链接)
鼠标光标样式:(CURSOR:)
Hand 手指;crosshair十字体;s-resize箭头朝下;move十字箭头;move箭头朝右;help加一问号;w-resize箭头朝左;n- resize箭头朝上;ne-resize箭头朝右上;nw-resize箭头朝左上;text文字I型;se-resize箭头斜右下;sw- resize箭头斜左下;wait漏斗;p
{cursor:url("光标文件名.cur"),text;} 光标图案(IE6)
1、布局常用CSS命名:
warp/warpper 外套(整体布局) content 容器 main 页面主体
content/container 内容块
site 站点 layout 布局 column 栏 sidebar 侧栏 nav 导航
center 中 left 左 right 右
2、模块常用 CSS命名:
header 页头 footer 页脚 logo 标志 banner 广告
login 登录 loginbar 登录条 regsiter 注册 search 搜索
subnav 子导航 tab 标签页/标签 menu 菜单 submenu 子菜单
scroll 滚动 hot 热点 vote 投票 list 文章列表
news 新闻 download 下载 guide 指南 service 服务
joinus 加入 partner 合作伙伴 friendlink 友情链接 copyright 版权
shop 购物车(功能区) source 资源 map 网站地图 homepage 首页
3、导航常用CSS命名:
nav 导航外套 mainbav 主导航 subnav 子导航
sidebar 边导航 topnav 顶导航 sidebaricon 边导航图标
leftsidebar 左导航 rightsidebar 右导航 menucontainer 菜单容器 dropmunu 下拉菜单 menu 菜单 submenu 子菜单
4、类常用CSS命名: 
title 标题 summary 摘要 status 状态 spce 特别 scroll 滚动
label 标签 current 当前 msg 提示信息 tips 小技巧
submit 提交按钮 btn 按钮 icon 图标 note 注释
red 红色 textbox 文本框 drop 下拉 form 表单
breadcrumb 导航提示 crumb 导航 count 统计 cor/corner 转角/圆角5、文件常用命名:
master.css 主要文件 base.css 基本共用 layout.css 布局,版面
module.css 模块 themes.css 主题 columns.css 专栏
font.css 文字 mend.css 补丁 forms.css 表单 print.css 打印
6、hack速查:
屏蔽IE浏览器(也就是IE下不显示)
*:lang(zh) select {font:12px !important;} select:empty
{font:12px !important;} 这里select是选择符,根据情况更换。

第二句是MAC上safari浏览器独有的。

仅IE7与IE5.0可以识别 *+html select {…}
仅IE7可以识别 *+html select {…!important;}
IE6及IE6以下识别 * html select {…} 或html/**/ >body select {…}
仅IE6不识别 selct { display /*屏蔽IE6*/:none;}
仅IE6与IE5不识别 select/**/ { display /*IE6,IE5不识别*/:none;}仅IE5不识别,屏蔽IE5 select/*IE5不识别*/ {…}
PS:在css里控制每段开头自动空两格:p { text-indent: 2em;}。

相关文档
最新文档