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

doctype 对 line-height 的影响 #7

Open
ibufu opened this issue Oct 8, 2016 · 0 comments
Open

doctype 对 line-height 的影响 #7

ibufu opened this issue Oct 8, 2016 · 0 comments

Comments

@ibufu
Copy link
Owner

ibufu commented Oct 8, 2016

前几天写页面的时候,碰到了一个问题,使用 line-height 来使一张图片垂直居中,可是并没有成功。折腾了半天,发现问题出在忘记在页面上设置 doctype。
doctype 的作用是声明浏览器应该以哪种文档类型来渲染页面。 表示以 HTML5 来渲染页面,也是目前主流的写法。许多样式和标签在不同的文档类型下都会存在差异,所以写页面千万不能忘记写上 。

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