HTML_CSS学习小结

CSS样式:

1、背景

background-attachment:fixed   //滚动页面时,图片固定不动

background-position  背景图定位


2、border(边框) 

border-width 边框宽度

border-style 边框样式   solid实线   dashed 虚线    dotted点线

border-color  边框颜色

border-width

border-top-width

border-left-width

...

border-style

border-top-style

....

border-color

border-top-color

...

3、font(字体)

font-weight 文字加粗(bold加粗/normal正常)

font-style 文字倾斜(italic倾斜/normal正常)

line-height 行高

font-family 字体

text-indent 首行缩进(1em=1个文字大小)

text-align 文本对其方式(left/right/center)

text-decoration 文本修饰(underline 下划线/line-through 删除线/overline 上划线/none)

letter-spacing 字母间距(字间距)


4、padding(内填充)

padding在元素的边框以内,内容以外,padding同样显示元素的背景

padding-top padding-right padding-bottom padding-left

可视宽高=border+padding+width(height)

5、margin(外边距)

margin元素的边框之外不显示元素背景

margin:10px 20px .. .. ;

margin-top(right/bottom/left)

margin 相邻两个元素的上下margin时可以叠加的








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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值