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

图片没有上下居中是什么原因 我显示的总是在最顶上 #11

Open
qianqikun opened this issue Jun 26, 2018 · 2 comments
Open

Comments

@qianqikun
Copy link

No description provided.

@Mr-Hawthorn
Copy link

+1 老哥解决了吗

@shitalo
Copy link

shitalo commented Mar 28, 2022

同,图片始终会显示在最顶上,而不是垂直居中。

原因:受用户代理样式表影响。会使得 body 的 display 被设置为 block,导致

#__previewImage-container .previewImage-box .previewImage-item .previewImage-image {
    vertical-align: middle;
}

无法生效。

解决办法:在html文件头部添加 <!DOCTYPE html> 声明,即可解决。

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

3 participants