如何并排调整 2 个嵌入元素的大小以及页面大小?
如何并排嵌入这些内容并使它们也随页面调整大小,以便视频占据页面左侧的大约 70%
且聊天占据其他 30% %?
我还希望它们与页面一起调整大小,这样看起来总是不错。
我对 HTML
和 CSS
有点陌生,感谢专业人士的帮助。
<div class="topnav">
<a href="index.html">Home</a>
<a class="active" href="watch.html">Watch</a>
<a href="https://pushpay.com/g/southknoxvillechurchofgod" target="_blank">Give</a>
<a href="events.html">Events</a>
</div>
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://vimeo.com/event/1736206/embed" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe></div>
<iframe src="https://vimeo.com/event/1736206/chat/" width="100%" height="100%" frameborder="0"></iframe>
How do I embed these side by side and make them also resize with the page so that the video takes up about 70%
of the left side of the page and the chat takes up the other 30%
?
I also want them to resize as a group with the page so it always looks nice.
I am somewhat new to HTML
and CSS
, I appreciate any help from the pros.
<div class="topnav">
<a href="index.html">Home</a>
<a class="active" href="watch.html">Watch</a>
<a href="https://pushpay.com/g/southknoxvillechurchofgod" target="_blank">Give</a>
<a href="events.html">Events</a>
</div>
<div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://vimeo.com/event/1736206/embed" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen style="position:absolute;top:0;left:0;width:100%;height:100%;"></iframe></div>
<iframe src="https://vimeo.com/event/1736206/chat/" width="100%" height="100%" frameborder="0"></iframe>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将视频和聊天内容包装在 Flexbox 容器内,并分别自定义视频和聊天的宽度。请参阅下面的代码片段以供参考:
Wrap the video and chat inside a flexbox container and customize the width for the video and chat separately. See the snippet below for your reference: