How do I stretch this content to fit full page width in desktop?
Html:
<div class="entry-content">
<blockquote class="wp-embedded-content" data-secret="paBu4nyBJV">.
<p>. <a href="https://tbwdrawingprize.artopps.co.uk/online-
entry/">Online Entry</a></p></blockquote>
<p><iframe title="“Online Entry” — TBW Drawing
Prize" class="wp-embedded-content" sandbox="allow-scripts"
security="restricted" style="position: absolute; clip: rect(1px,
1px, 1px, 1px);" src="https://tbwdrawingprize.artopps.co.uk/online-
entry/embed/#?secret=paBu4nyBJV" data-secret="paBu4nyBJV"
width="600" height="338" frameborder="0" marginwidth="0"
marginheight="0" scrolling="no"></iframe></p>
<p> </p>
<p><embed style="width: 500px; height: 300px;"
答案 0 :(得分:2)
如果您引用的是iframe,则将width属性的宽度设置为600px
。
如果将其替换为100%
,它将填充父级的宽度。
<iframe title="“Online Entry” — TBW Drawing
Prize" class="wp-embedded-content" sandbox="allow-scripts"
security="restricted" style="position: absolute; clip: rect(1px,
1px, 1px, 1px);" src="https://tbwdrawingprize.artopps.co.uk/online-
entry/embed/#?secret=paBu4nyBJV" data-secret="paBu4nyBJV"
width="100%" height="338" frameborder="0" marginwidth="0"
marginheight="0" scrolling="no"></iframe>
如果您想使更改对所有iframe
和embed
标签都通用,请尝试以下CSS
iframe, embed {
width: 100% !important
}
答案 1 :(得分:1)
如果我不误解您的问题,则应将宽度设置为100%。我试图在您发布的链接上对其进行编辑,它似乎非常适合屏幕宽度。
<div class="entry-content">
<blockquote class="wp-embedded-content" data-secret="paBu4nyBJV">.
<p>. <a href="https://tbwdrawingprize.artopps.co.uk/online-
entry/">Online Entry</a></p></blockquote>
<p><iframe title="“Online Entry” — TBW Drawing
Prize" class="wp-embedded-content" sandbox="allow-scripts"
security="restricted" style="position: absolute; clip: rect(1px,
1px, 1px, 1px);" src="https://tbwdrawingprize.artopps.co.uk/online-
entry/embed/#?secret=paBu4nyBJV" data-secret="paBu4nyBJV"
width="100%" height="338" frameborder="0" marginwidth="0"
marginheight="0" scrolling="no"></iframe></p>
<p> </p>
<p><embed style="width: 100%; height: 300px;"
答案 2 :(得分:0)