gpt4 book ai didi

html - 如何实现类似于上述网站中的分段(家庭、关于、工作等)背景格式?

转载 作者:行者123 更新时间:2023-11-28 09:31:17 28 4
gpt4 key购买 nike

网站:wadegarett.com

我正在尝试使用 Zurb-Foundation 5 来构建类似的网站。 Foundation 5 是否有任何可以实现类似格式的类?我在 Foundation 4 文档中找到了“section-container”类并使用了以下代码:

<section id="about" class="section-container">
<h1>Hello There!</h1>
<h3>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</h3>
</section>

有点用,但我找不到 Foundation 5 部分的任何文档。可以使用它吗?

如何定义每个部分的高度?

这如何使用普通的 CSS 样式来完成?

最佳答案

好吧,我很好奇,于是拿起我的笔记本电脑,我想你要找的是 Foundation 的 Magellan 函数:

http://foundation.zurb.com/docs/components/magellan.html

您可以将其与他们的 Topbar 功能混合使用,这样您就拥有了您正在寻找的导航系统。

http://foundation.zurb.com/docs/components/topbar.html

背景效果只是一堆具有不同颜色(我是加拿大人哈哈)背景的 div。

我们需要为一些东西添加 100% 的高度,但导航栏始终必须固定,并且我们必须向我们的 div 添加导航栏高度的填充。

<html>
<head>
<style>
.html, .body { height: 100%; }
.navigation { position: fixed; top: 0; width: 100%; height: 40px; background: #ccc; }
.home, .work { background: #fff; }
.about, .contact { background: #ddd; }
.wrap { width: 100%; min-height: 100%; padding-top: 40px; }
</style>
</head>
<body>
<div class="navigation">...your sticky nav would go here...</div>
<div class="wrap home">
<div class="row">
<div class="small-12 columns">
<p>Content</p>
</div>
</div>
</div>
<div class="wrap about">
<div class="row">
<div class="small-12 columns">
<p>Content</p>
</div>
</div>
</div>
<div class=" wrap work">
<div class="row">
<div class="small-12 columns">
<p>Content</p>
</div>
</div>
</div>
<div class="wrap contact">
<div class="row">
<div class="small-12 columns">
<p>Content</p>
</div>
</div>
</div>
</body>
</html>

关于html - 如何实现类似于上述网站中的分段(家庭、关于、工作等)背景格式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25699298/

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