css样式表:样式

样式大小

width:宽度

height:高度

样式背景:

background-color:背景色

background-image:背景图片

background-repeat:背景图的平铺

background-position:背景图片位置

background-attachment:设置背景图是否滚动

background-size:背景图大小  按像素

字体:

font-family:字体样式

font-size:字体大小。12px 网页正文基本用14px 16px

font-style:italic倾斜

font-weight:bold加粗

text-decoration是字体加下划线类

underline:下划线

overline:上划线

line-through:删除线

none:用来去掉超级链接的下划线

color:字体颜色

b为id名

<style type="text/css">
        #b{width:2000px;
        height:2000px;
        background-color:#9C6;
        background-image:url(timg.jpg);
        background-repeat:no-repeat;
        background-position:center;
        background-attachment:fixed;
        background-size:1000PX;
        font-family:"微软雅黑";
        font-size:24px;
        font-weight:400;
        font-style:italic;
        text-decoration:underline;
        color:#F00;
        text-align:center;
        vertical-align:200px;
        line-height:100px;

对齐方式:

text-align:水平对齐方式

vertical-align:垂直对齐方式,配合行高使用

line-height:行高

text-indent:缩进  单位是像素

  </style>
        <link href="test.css" rel="stylesheet" type="text/css" />
            <style type="text/css">
                #c{ width:1000px;
                height:500px;
                margin:50px 60px 80px 40px;
                background-color:#CFC;
                }
        
                </style>
         <style type="text/css">

像素由上右下左顺时针转

边界边框:

margin:外边距  上右下左

padding:内边距 上右下左  如果加了内边距该元素会相应的变大

border:1px solid#60F间歇方式 第一个边框粗细  第二个边框样式  第三个边框颜色

列表方块:

list-style  none将列表前面的序号去掉

list-style-image  可以将前面的序号变成图片

位置:

position:fixed固定  相对于浏览器边框位置固定

top:距离上边的距离

right:距离右边的距离

bottom:距离下边的距离

left:距离左边的距离

css的一种样式,作用是当鼠标移动到该单元格上时,鼠标会由箭头形状改为手的形状。

附:cursor属性
十字准心 cursor: crosshair;
手 cursor: pointer;
cursor: hand;
写两个是为了照顾IE5,它只认hand。
等待/沙漏 cursor: wait;
帮助 cursor: help;
无法释放 cursor: no-drop;
文字/编辑 cursor: text;
可移动对象 cursor: move;
向上改变大小(North) cursor: n-resize;
向下改变大小(South) cursor: s-resize;
向右改变大小(East) cursor: e-resize;
向左改变大小(West) cursor: w-resize;
向上右改变大小(North East) cursor: ne-resize;
向上左改变大小(North West) cursor: nw-resize;
向下右改变大小(South East) cursor: se-resize;
向下左改变大小(South West) cursor: sw-resize;
自动 cursor: auto;
禁止 cursor:not-allowed;
处理中 cursor: progress;
系统默认 cursor: default;
原文地址:https://www.cnblogs.com/palpitate/p/7899600.html