【发布时间】:2021-12-29 14:22:14
【问题描述】:
我总共有六个iframes,想在它们上面添加三个标题。
html:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>Title xxx</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="xxxx" />
<meta name="description" name="description" content="xxxx" />
<meta http-equiv="pragma" content="public" />
<meta http-equiv="cache-control" content="public" />
<meta http-equiv="identifier-url" name="Identifier-URL" content="" />
<meta http-equiv="revisit-after" name="Revisit-after" content="7 days" />
<meta http-equiv="robots" name="Robots" content="all" />
<meta name="robots" content="INDEX|FOLLOW" />
<meta name="Author" content="xxx xxx, xxx Team" />
<link rel="stylesheet" type="text/css" href="style/main.css" />
</head>
<body>
<div id="container">
<section id="a_logo">
<img src="images/a_logo.png">
</section>
<section id="b_logo">
<img src="images/b_logo.png">
</section>
<!-- content -->
<section id="content">
<h1>Linux UF Packages</h1>
<a href="packages/linux/xxx_PROD_nonDMZ.tgz">xxx Linux non DMZ PROD (x64)</a></br>
<a href="packages/linux/xxx_PROD_DMZ.tgz">xxx Linux DMZ PROD (x64)</a></br>
<a href="packages/linux/xxx_AB_nonDMZ.tgz">xxx Linux non DMZ AB (x64)</a></br>
<a href="packages/linux/xxx_AB_DMZ.tgz">xxx Linux DMZ AB (x64)</a></br>
<a href="packages/linux/xxx_EW_nonDMZ.tgz">xxx Linux non DMZ EW (x64)</a></br>
<a href="packages/linux/xxx_EW_DMZ.tgz">xxx Linux DMZ EW (x64)</a></br>
<a href="packages/linux/xxx.docx">Installation Guide </a>
<h1>Windows UF Packages</h1>
<a href="packages/windows/xxx_x64.zip">xxx Windows PROD, AB, EW (x64)</a></br>
<a href="packages/windows/xxx.docx">Installation Guide for Windows</a>
</section>
<section id="stats">
<div>
<h2>header</h2>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
</div>
<div>
<h2>header2</h2>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
</div>
<div>
<h2>header3</h2>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
<iframe height="160" width="480" frameborder="0" src="https://www.w3schools.com"></iframe>
</div>
</section>
<footer>
<p>Created and managed by <a href="mailto:xxx&subject=xxx">xxx Team</a> 2021 | Last update: 2021-12-28</p>
</footer>
</div>
</body>
</html>
css:
* {
padding: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
margin: 50px;
font-family: Trebuchet, Verdana, Arial, Helvetica, Sans-serif;
font-size: 14px;
text-decoration: none;
line-height: 1.5;
font-weight: 400;
color: #434343;
background: #fff;
}
.container {
margin: 0 auto;
}
#a_logo {
float: left;
display: block;
max-width: 200px;
max-height: 100px;
width: auto;
height: auto;
}
#b_logo {
float: left;
display: block;
padding: 0 0 0 600px;
max-width: 200px;
max-height: 100px;
width: auto;
height: auto;
}
#content {
float: left;
font-size: 20px;
text-align: left;
width: 100%;
margin: 25px 50px 25px;
padding: 50px 0;
background-image: url("../images/");
background-position: left;
background-repeat: no-repeat;
}
#content h1 {
clear: both;
color: #000;
padding: 10px 0 10px;
margin-top: 50px;
}
#content a {
color: #6e6e6e;
}
#content a:hover {
color: #b18904;
}
#content a:visited {
color: #848484;
}
#stats iframe {
display: inline-block;
}
footer {
clear: both;
text-align: left;
color: #000;
margin: 0 50px;
padding: 10px 0 10px;
}
footer p a {
color: #6e6e6e;
}
footer p a:hover {
color: #b18904;
}
footer p a:visited {
color: #848484;
}
结果应该是这样的:
header header2 header3
iframe(prod1) iframe(uat1) iframe(dev1)
iframe(prod2) iframe(uat2) iframe(dev2)
我已经尝试了几种方法,但要么破坏了 iframe 的垂直结构,要么标题位置不正确。
【问题讨论】:
-
最后一组
<iframe>s 和3 个<header>s 没有发布。 -
我没有添加标题,因为我没有成功。我总共有 6 个 iframe,显示在我的初始帖子中。