CSS 常用属性概览

建议学习时长: 10分钟
学习方式:了解

学习目标

  • 大概了解下,CSS 有哪些常用属性。

详细介绍

CSS 的属性非常之多,我们只需了解有哪些即可。很多属性,不知怎么用,查文档好了。

CSS 属性的参考文档

教程

要学的包括

下面是常见属性的罗列。

布局

  • position,z-index
  • top, bottom, right, left
  • float, clear
  • flex-direction, flex-wrap, justify-content ...
  • text-align
  • vertic­al-­align

尺寸

  • width, min-width, max-width
  • height, min-height, max-height

盒模型

  • box-sizing
  • margin, margin-left, margin-right, margin-top, margin-bottom
  • padding, padding-left, padding-right, padding-top, padding-bottom

显示

  • display
  • visibility
  • opacity
  • overflow

字体

  • font, font-f­amily, font-size, font-w­eight, font-style, color
  • @font-face

文本

  • text-indent
  • text-d­eco­ration, text-s­hadow
  • text-overflow
  • line-height
  • word-s­pacing, letter­-sp­acing
  • white-­space

背景

  • background
  • background-image, background-color
  • background-position
  • background-repeat
  • background-size

边框相关

  • border, border-width, boder-style, border-width, border-color
  • outline

表格

  • border­-sp­acing, border­-co­llapse, empty-­cells

列表

  • list-style, list-s­tyl­e-type, list-s­tyl­e-image, list-s­tyl­e-p­osition

变形

  • transform, transform-origin
  • scale, scale3d, rotate, translate, perspective, matrix ...

渐变

  • transition, transition-property, transition-duration, transition-delay, transition-timing-function

动画

  • animation, animation-name, animation-duration, animation-play-state ...
  • @keyframes

伪元素

  • content

其他

  • border-radius
  • cursor
  • filter
  • will-change
  • -webkit-overflow-scrolling :设置为 touch 滚动会带惯性
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    love2013阅读 6,857评论 0 11
  • 选择qi:是表达式 标签选择器 类选择器 属性选择器 继承属性: color,font,text-align,li...
    wzhiq896阅读 5,865评论 0 2
  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 14,687评论 1 92
  • 1、垂直对齐 如果你用CSS,则你会有困惑:我该怎么垂直对齐容器中的元素?现在,利用CSS3的Transform,...
    kiddings阅读 8,398评论 0 11
  • 1. 25条关于提高app性能的技巧 作者: HuyaRC原文地址:http://www.jianshu.com/...
    Ashen_阅读 606评论 0 0

友情链接更多精彩内容