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 世界》-74页-关于内联元素padding垂直反向作用的疑问 #37

Open
Pseven7 opened this issue Feb 19, 2023 · 0 comments

Comments

@Pseven7
Copy link

Pseven7 commented Feb 19, 2023

照我对本书对于内联元素的理解,外在盒子为 inline 的元素都是内联元素对吧,所以 display 值为 inline 和 inline-block 的元素都是内联元素,原书在这里以内联元素举例 padding 的垂直作用方向
image
如果我这里给a标签设为inline,垂直方向只会发生层叠不会被撑开,但是我如果设置 display 为 inline-block 就会像下面一样被撑开
image
但是书原文就是说的内联元素,是我对内联元素的理解出现问题了吗?还是另有玄机呢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant