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

iOS 下 iframe 撑开父容器高度 bug #5

Open
shiiiiiiji opened this issue Mar 28, 2018 · 0 comments
Open

iOS 下 iframe 撑开父容器高度 bug #5

shiiiiiiji opened this issue Mar 28, 2018 · 0 comments
Assignees
Labels

Comments

@shiiiiiiji
Copy link
Owner

shiiiiiiji commented Mar 28, 2018

最近在调试一个非常诡异的 bug ,在 PC 和安卓下都是正常的,但是发现在 iOS 却出现问题。代码如下:

  • HTML
<div class="wrapper">
	<iframe src="https://www.cnblogs.com/DSC1991/p/8665891.html"></iframe>
</div>
  • CSS
.wrapper{
  width: 100%;
  height: 200px;
  
}

.wrapper iframe{

}

image

发现iframe竟然不受父容器的高度限制,撑开了父容器,导致滑动UI显示异常。

在父容器应用下面CSS便显示正常:

-webkit-overflow-scrolling: touch;
overflow-y: scroll;

参考

@shiiiiiiji shiiiiiiji added the bug label Mar 28, 2018
@shiiiiiiji shiiiiiiji self-assigned this Mar 28, 2018
@shiiiiiiji shiiiiiiji removed the BUG label Oct 31, 2018
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