css样式里常用代码 包括哪些

html-css011

css样式里常用代码 包括哪些,第1张

font-size:12px/*文字大小*/

color:#CCCCCC/*文字颜色*/

font-family:Arial,

Helvetica,

sans-serif/*设置字体*/

font-weight:bold/*文字加粗*/

text-align:center/*DIV标签内部水平方向居中或居左右*/

text-decoration:underline/*下划线*/

line-height:150%/*行高*/

margin:10px

0

5px

0/*容器外部边距*/

margin-top:10px

padding:10px

0

5px

0/*容器内部边距*/

float:left/*1.仅在做列的结构才用

2.用了float要用父DIV包起来*/

background-color:#999999/*背景颜色*/

background-image:url(images/test.gif)/*背景图片*/

background-repeat:no-repeat/*背景图片不平铺*/

background-position:5px

10px/*背景图片的位置,第一个为横坐标,第二个为纵坐标*/

list-style-type:none/*消除ul无序列表li前面的小黑点*/

display:block/*以块形式显示,通常用于链接中实现鼠标划过的效果*/

display:inline/*当用了float时做靠边的DIV外边距出现翻倍情况时才使用,针对的是IE6的一个bug*/

border:1px

solid

#ccc/*表格、DIV、LI、A等容器的边框属性,虚线是dashed*/

overflow:hidden/*溢出部分隐藏*/

overflow:auto/*自动判断容器高度,从而选择自动出现/隐藏垂直滚动条*/

/*自动适应高度,并且兼容火狐的做法*/

clear:both

overflow:hidden

没怎么看懂,你是想要背景颜色的代码吗?#4298b3 红色66 绿色152 蓝色179

这是最左边的颜色

最右边的颜色代码是black黑色

颜色的css代码是:<font color="#4298b3">守护是为了不让。。。</font>