gpt4 book ai didi

css - 响应式 HTML/CSS

转载 作者:行者123 更新时间:2023-11-27 23:26:54 25 4
gpt4 key购买 nike

对于我的元素,我需要制作一个响应式表格,其中包含 HTML5 视频。

例子: http://ads.memo2.nl/Jeroen/2016/TVTest.html

<html>
<body>
<head>
<title> :: MeMo2 :: </title>
<style type="text/css">
table {
font-size: 0;
}
</style>
<script src="http://ads.memo2.nl/Jeroen/2016/JWPlayer/jwplayer-7.4.4/jwplayer.js"></script>
<script>jwplayer.key="7lMg3sdALZwtB8ygJTZ/MDB0lyJ+bFuyT7qDEQ==";</script>
</head>
<body>
<div id="tvWrapper" style="margin: 0px auto; width: 100%; transition: all 1s; -webkit-transition: all 1s;">
<div style="width: 100%; margin: 0 auto; position: relative;">
<div style="background: url('http://s28.postimg.org/3xquvgh31/TVtop.png') no-repeat; background-size: 100% 100%; width: 100%; height: 8px; z-index: 2;"></div>
<div style="background: url('http://s28.postimg.org/3py61tzst/TVleft.png') no-repeat; background-size: 100% 100%; float: left; width: 8px; padding-bottom: 56.25%; position: absolute; z-index: 2;"></div>

<div style="float: left; width: calc(100% - 8px); padding-bottom: 56.3%; position: relative; z-index: 1;">
<div id="myElement" style="position: absolute; width: 100%; height: 100%; margin: 0 auto;border: 0;"></div>
<script type="text/JavaScript">
var playerInstance = jwplayer("myElement");
playerInstance.setup({
file: "http://ads.memo2.nl/banners/defensie/2016/Veteranendag/Dominique.mp4",
aspectratio: "16:9",
width: "100%",
skin: {
name: "roundster",
active: "#add136",
inactive: "#bbb7b7",
background: "white"
}
});
</script>
</div>

<div style="background: url('http://s3.postimg.org/vzf09qvk3/TVright.png') no-repeat; background-size: 100% 100%; float: right; width: 8px; padding-bottom: 56.25%; position: absolute; right: 0; z-index: 2;"></div>
<div style="background: url('http://s24.postimg.org/fxwbp4pv9/TVbottom.png') no-repeat; background-size: 100% 100%; width: 100%; padding-bottom: 8%; clear: both; z-index: 2;"></div>
</div>
</div>
</body>
</html>

如您所见,它是响应式的,但它将电视的底部设置在浏览器的底部。有没有简单的方法来解决这个问题?

如果我放入 iFrame,接下来发生的事情是电视的底部设置在电视顶部的正下方。

例子: http://ads.memo2.nl/Jeroen/2016/TestingPlz.html

table {
font-size: 0;
}
iframe {
width: 100%;
max-width: 1000px;
min-height: 700px;
}
<iframe src="http://ads.memo2.nl/Jeroen/2016/TVTest.html" frameborder="0" scrolling="no"></iframe>

我的想法是让电视在 iFrame 中响应,然后在底部使用 TVbottom.png。

最佳答案

尝试删除:

padding-bottom: 56.3%;

来自包装 JW Player 目标元素的 DIV (#myElement)

关于css - 响应式 HTML/CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38070422/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com