接触到的elements/attributes整理

CSS Properties

  • font系列(大小的单位:120%,1.2em, small)
    • font-style = normal italic oblique
    • font-variant
    • font-weight = bold normal
    • font-size/line-height //单位可以为:1.1em、50%
    • font-family
  • border系列
    • top bottom
    • -style
    • -color
    • -width
  • padding
  • margin
  • backgroud系列
    • -color
    • -image
  • width,height,color,text-align
  • vertical-align: top; bottom
    /* 相对于所在的div,置顶还是沉底 */
  • visibility: visible; hidden
    /* 是否可见 */
  • box-sizing: border-box;
    /* 配合width: number ,可以使padding和border包含在width里面,省去计算px数(此属性较新) */
  • 布局
    • display 默认一般是inline || block ||none

      display: inline
      /* 使block表现得如同inline */display: table, table-row, table-cell
      /* 表格式布局 */
      display: inline-block
      /* 行内块,一块一块flow过去 */
      display: flex
      /* container设置display,子元素设置flex:1,2||initial||none */
      /* initial和none配合width设置 */
      /* container同时再追加设置align-items: center,使子div居中布置,与text-align相似,较新 */
      display: table, table-row, table-cell
    • position = absolute; fixed; relative; static;
      /* static: 默认项,不会被position. */
      /* relative: 设置了relative的元素可在子元素设置top~left:px,使之在原位置基础上产生偏移. */
      /* fixed: 元素会相对于视窗来定位,即:定在一个位置上不动,即使滑动滚轮。 */
      /* absolute: 元素会相对于最近的"position != static"的父元素来定位。 */
    • max-width: 0px
      /* ?绝对式布局? */
    • float: right,left (任意块元素)
      /* 浮动式,配合左右的兄弟元素应设置maring-left~right:px来防止覆盖 */
      /* 页脚设置clear:left~right防止覆盖 */
      overflow: auto;
      /* 使该元素的子元素浮动时不会溢出 */

Elements

  • em
  • table ; th ; tr
  • form
    • input type = select,
    • action= ; method= ;
  • html 5
    1. nav
    2. section
    3. aside
    4. header

Others(elements' attributes)

  • title="comment"
    /* hover 此元素时, 弹出一个comment */
  • alt="comment"
  • 有默认的margin,可手动设为0px;
  • width=100% 自适应div的宽度;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值