CSS的一些属性总结

文本/字体属性

font-style:normal / italic(倾斜) / oblique

text-align(文本水平):center / left / right / justify(两端对齐)

text-indent: 缩进(常使用em单位)

  • text-indent: 2em;缩进2字符

text-decoration: 文本修饰属性

  • none: 去除下划线
  • underline: 下划线
  • overline: 上划线
  • line-through: 删除线
---------------------------分割线----------------------------------------

列表属性:list-style

  • none:去除列表默认样式
  • disc: 实心圆,默认
  • circle: 空心圆
  • aquare: 实心方块

list-style-image: url(‘地址’),自定义列表图形

list-style-position: outside(默认,外面), inside(里面)

---------------------------分割线----------------------------------------

背景属性:background

  • background-color: red(等于 background: red)

  • background-image: url(’’) 填充背景图片

  • background-repeat: no-repeat(不平铺), repeat-x(x轴平铺), repeat-y(y轴平铺), repeat(默认)

  • background-position: 值1(x轴) 值2(y轴)

    • 值1:left center right / 像素(正负)
    • 值2:top center bottom / 像素(正负)

简写:background: red url(’’) no–repeat

---------------------------分割线----------------------------------------

边框属性 border

border: 1px solid black;

  • solid 实线
  • dotted 点化线
  • dashed 虚线

border: none; 去除边框

border-top/right/bottom/left

---------------------------分割线----------------------------------------

a标签

<img src="图片链接地址" art="图片不能加载时的提示信息" title="鼠标移到img上的提示信息" >
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值