有人能帮我吗? 我想在顶部使用导航框架并在下面的主框架上加载网站。
一切正常!
但是如果我将窗口最小化/调整为全屏以外的其他内容,我将无法正确缩放,
尝试了 CSS- margin,padding,使用了一个没有 div 的全新网站来尝试从头开始,将框架集设置为相对大小,但是尽管我尽了一切努力,导航一旦最小化就会消失,
index.hmtl 上的框架集:
<frameset rows="*,3*" cols="1" framespacing="" frameborder="no" bordercolor="#D8D6DB">
<frame src="menu.html" name="menu" frameborder="no" scrolling="no" >
<frame src="home.html" name="main" frameborder="no" scrolling="yes" >
</frameset>
导航
h1 id="logo"><a href="home.html" target="main">CFS ME Therapie</a></h1>
nav id="nav">
li>
li><a href="home.html" target="main">Startseite</a></li>
li><a href="therapie.html" target="main">Therapieansatz</a></li>
li><a href="leistungen.html" target="main">Leistungen</a></li>
li class="break"><a href="praxis.html" target="main">Praxis</a></li>
li><a href="qualifikation.html" target="main">Qualifikation</a></li>
li><a href="kontakt.html" target="main" >Kontakt</a></li>
CSS
/* 标题 */
#logo {
position: relative;
z-index: 1;
top: 3px;
left: 50%;
width: 260px;
margin-left: -7.5em;
}
#logo a {
display: block;
width: 100%;
height: 4em;
line-height: 4em;
background: rgba(255, 255, 255, 0.15);
border: solid 1px;
border-color: #fff;
border-color: rgba(255, 255, 255, 0.75);
border-top: 0;
border-radius: 0 0 0.35em 0.35em;
color: #fff;
display: inline-block;
letter-spacing: 3px;
text-align: center;
text-transform: uppercase;
font-size: x-large;
font-weight: bold;
alignment-adjust: middle;
margin: auto;
}
#nav {
text-align: center;
position: absolute;
top: 60px;
left: 0px;
width: 100%;
height: 4em;
line-height: 4em;
}
#nav > ul {
margin: 0;
}
#nav > ul > li {
display: inline-block;
margin-left: 1em;
}
#nav > ul > li > ul {
display: none;
}
#nav > ul > li > span, #nav > ul > li > a {
color: #fff;
text-decoration: none;
outline: 0;
border: 0;
border: solid 1px rgba(255, 255, 255, 0);
border-radius: 0.35em;
padding: 0.3em 1em 0.3em 1em;
-moz-transition: border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
-webkit-transition: border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
-o-transition: border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
-ms-transition: border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
transition: border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
}
#nav > ul > li.active > span, #nav > ul > li.active > a {
border-color: rgba(255, 255, 255, 0.75);
background-color: rgba(255, 255, 255, 0.15);
color: #fff;
}
#nav > ul > li:first-child {
margin-left: 0;
}
#nav > ul > li.break {
margin-left: 20em;
}
最佳答案
您的 HTML 已损坏。也使用 <frame>
和 <frameset>
已弃用。
您可以阅读有关响应式嵌入的信息 here .
关于html - 尽管尝试了所有方法,但仍无法调整顶部导航的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35185451/