美文网首页
二、CSS背景与列表

二、CSS背景与列表

作者: 小伙子长Da挺忐忑的嘛 | 来源:发表于2017-09-07 00:08 被阅读0次

    CSS中背景的使用

    属性名称属性值说明

    background-attachmentscroll设置背景图像会随视窗滚动

    条的移动而移动。

    fixed设置背景图像不会随视窗滚动条

    的移动而移动。

    background-color十六进制background-color:#ff0000;

    英文名称background-color:red;

    三原色background-color:rgb(255,0,0)

    transparentbackground-color:transparent;透明

    background-imageURLbackground-image:url("bg.jpg")

    背景图片

    none不设置背景图片

    background-positiontop left设置背景图案出现在上左方。

    top center设置背景图案出现在上方中间。

    top right设置背景图案出现在上右方。

    center left设置背景图案出现在中间左方。

    center center设置背景图案出现在IE中间。

    center right设置背景图案出现中间右方。

    bottom left设置背景图案出现在下左方。

    bottom设置背景图案出现在正下方。

    bottom right设置背景图案出现在下右方。

    background-repeatrepeat将背景图案填满整个背景。

    repeat-x将背景图案在水平方向添满。

    repeat-y将背景图案在垂直方向添满。

    no-repeat图案只出现一次。

    背景图案简化方案:

    background:颜色 背景图片 repeatattachment position




     CSS中列表的使用

    属性名称             属性值                 说明

    list-style-type          none                     无符号

                 disc实体的小圆点。

                  circle空心的小圆点。

                    square实心的小方块。

    decimal1,2,3...

    lower-romani,ii,iii...

    upper-romanI,II,III...

    lower-alphaa,b,c,d,e...

    upper-alphaA,B,C,D,E...

    list-style-position inside清单项目较往右移。

    outside清单项目正常显示。

    list-style-imageURLlist-style-image:url(lmk.gif)

    none不会显示任何图象

    清单的简化设置:

    list-style:circle insideurl("bullet.gif")

    相关文章

      网友评论

          本文标题:二、CSS背景与列表

          本文链接:https://www.haomeiwen.com/subject/kjdbjxtx.html