Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS选择器有哪些?哪些属性可继承? #63

Open
GGXXMM opened this issue Nov 16, 2020 · 0 comments
Open

CSS选择器有哪些?哪些属性可继承? #63

GGXXMM opened this issue Nov 16, 2020 · 0 comments
Labels

Comments

@GGXXMM
Copy link
Owner

GGXXMM commented Nov 16, 2020

一、CSS选择器

  • id选择器(#a)
  • class选择器(.b)
  • 标签选择器(p)
  • 相邻选择器(h1+p)
  • 子选择器(ul>li)
  • 后代选择器(li a)
  • 属性选择器a[class="external"]
  • 伪类选择器(li:nth-child)
  • 通配符选择器(*)

二、可继承的属性

2.1 字体属性

  • font-family
  • font-size
  • font-weight
  • font-style

2.2 文本系列属性

  • text-indent
  • text-align
  • line-height
  • word-spacing
  • letter-spacing
  • color

2.3 其他

  • cursor
  • visibility

三、不可继承属性

border、margin、padding、width、height

@GGXXMM GGXXMM added the css label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant