如何在 iframe 周围创建边框?

sim*_*ind 6 html css wordpress iframe border

我正在尝试为 wordpress 上的一些 connetnt 添加边框,并且因为我不知道如何添加 css 文件,所以我试图在 html 中执行所有操作(或者至少我认为是 html)。我的编码知识留给了我在高中的岁月。

这是我想围绕它创建一个简单的 1 或 2 像素黑色边框的内容:

<iframe src="https://link_to_my_file/file.pdf" style="width:1000px; height:300px;" frameborder="1"></iframe>
Run Code Online (Sandbox Code Playgroud)

但是这不起作用。所以我试过这种方式:

<iframe src="https://link_to_my_file/file.pdf" style="width:1000px; height:300px;" frameborder="1"></iframe> <style> iframe.solid {border-style:solid} </style> 
Run Code Online (Sandbox Code Playgroud)

但这也不起作用。

我如何以正确的方式放置东西而不必使用单独的 css 文件?

fil*_*rak 6

如果要使用内联 HTML 样式:

 <iframe src="https://link_to_my_file/file.pdf" 
    style="width:1000px; height:300px; border: 1px solid black;"></iframe>
Run Code Online (Sandbox Code Playgroud)