为什么当我尝试在页面上嵌入tiktok时,iframe的高度会无限增长?这种情况只发生在Iphone上。因此,下面的div会无限期地向下滚动
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<blockquote class="tiktok-embed" cite="https://www.tiktok.com/@lemiericette1/video/6892399695595965697" data-video-id="6892399695595965697" style="max-width: 605px;min-width: 325px;" > <section> <a target="_blank" title="@lemiericette1" href="https://www.tiktok.com/@lemiericette1">@lemiericette1</a> <p><a title="banana" target="_blank" href="https://www.tiktok.com/tag/banana">#banana</a> <a title="chocolate" target="_blank" href="https://www.tiktok.com/tag/chocolate">#chocolate</a> <a title="dessert" target="_blank" href="https://www.tiktok.com/tag/dessert">#dessert</a> <a title="new" target="_blank" href="https://www.tiktok.com/tag/new">#new</a> <a title="idea" target="_blank" href="https://www.tiktok.com/tag/idea">#idea</a></p> <a target="_blank" title="♬ sonido original - s.o.n.i.d.o" href="https://www.tiktok.com/music/sonido-original-6871655704382556930">♬ sonido original - s.o.n.i.d.o</a> </section> </blockquote> <script async src="https://www.tiktok.com/embed.js"></script>
<div>
hello
</div>
</body>
</html>发布于 2020-11-26 05:43:29
您可以通过限制其父元素的最大高度值来完成此操作,如下所示:
blockquote {
max-height:500px;
}或html格式
<blockquote style="max:height:500px"...https://stackoverflow.com/questions/65013079
复制相似问题