返回介绍

fluid-fixed

发布于 2023-08-19 19:14:40 字数 2294 浏览 0 评论 0 收藏 0

fluid-fixed

<style>
    /**
     * Fluid background, fixed content
     */

    body {
        margin: 0;
        font: 100%/1.5 sans-serif;
    }

    header, section, footer {
        padding: 1em calc(50% - 350px);
    }

    header {
        background: orange;
        color: white;
    }

    section + section {
        background: #eee;
    }

    footer {
        background: #333;
        color: white;
    }
</style>
<body>
<header>
    <h1>Fluid background, <br>fixed content</h1>
</header>
<section>
    <h1>Heading</h1>
    <p>Bacon ipsum dolor amet voluptate et shoulder, ipsum flank tongue exercitation commodo sed beef ribs drumstick in
        venison laborum. Laboris ut enim id drumstick, et aute esse. Consequat ad kielbasa anim pork loin turkey qui
        cupidatat drumstick doner labore. Nulla sirloin jerky do sed magna meatloaf. Ribeye ea ut elit leberkas laboris
        sausage corned beef drumstick cillum non.</p>
</section>
<section>
    <h1>Another heading</h1>
    <p>Nostrud landjaeger cillum beef cow tail cupidatat non mollit voluptate jowl. Enim sunt in, flank hamburger
        proident qui. Id aute excepteur chuck magna tempor ipsum pork chop t-bone. Frankfurter meatball pork loin beef
        et leberkas pork. Pig ball tip pancetta in.</p>
    <p>Ribeye in veniam ipsum flank. Elit incididunt t-bone proident meatball. Porchetta exercitation prosciutto sausage
        chuck ut eu brisket shank pastrami turkey sunt laboris tenderloin anim. Landjaeger do venison laboris kevin.</p>
</section>
<footer>
    <p>2015 XXXXXX (j/k, feel free to use wherever)</p>
    <p>Consectetur et t-bone pork loin. Tri-tip cupim in, spare ribs velit exercitation in. Tempor cillum fugiat, nisi
        leberkas reprehenderit anim laboris proident cow. Eu fatback kevin sint, ad shoulder in venison picanha. Sausage
        drumstick capicola, culpa boudin pork belly minim aute ipsum biltong picanha venison nulla adipisicing.</p>
</footer>
</body>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文