常见的样式

行间样式表:<divstyle="……"></div>

内部样式表:<style>…………</style>

外部样式表:<linkhref="style.css" rel="stylesheet"/>

background:
height 高度
width宽度
background-attachment:fixed; 背景是否滚动
background-color:gray; 背景颜色
background-image:url(bg.jpg);  背景图
background-repeat:no-repeat; 背景图是否重复
background-position:center 0px; 背景图位置
border:
border-width边框宽度
border-style   边框样式
border-color  边框颜色
solid      实线
dashed 虚线
dotted   点线(IE6不兼容)
padding:

padding-top         上边内边距

 padding-right         右边内边距

 padding-bottom    下边内边距

 padding-left            左边内边距

  padding: top right bottom left;

  注意:内边距相当于给一个盒子加了填充厚度会影响盒子大小。
margin:
margin外边距
外边距的问题:

  1、上下外边距会叠压;

  2、父子级包含的时候子级的margin-top会传递给父级;(内边距替代外边距)


外边距复合:margin:top right bottom left;

font-size                  文字大小(一般均为偶数)

font-family              字体(中文默认宋体)

color                        文字颜色(英文、rgb、十六位进制色彩值)

line-height              行高

text-align                文本对齐方式

text-indent             首行缩进(em缩进字符)

font-weight            文字着重

font-style                文字倾斜

text-decoration      文本修饰

letter-spacing         字母间距

word-spacing         单词间距(以空格为解析单位)

width宽度                                 height 高度

background背景                       border 边框

padding内边距                          margin 外边距

font-size  文字大小                    font-family 字体

color文字颜色                    line-height 行高

text-align文本对齐方式             text-indent 首行缩进

font-weight文字着重                 font-style 文字样式

text-decoration文本修饰           letter-spacing 字母间距

word-spacing单词间距             












  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值