html - 网站顶部和按钮之间的空间?

标签 html css flexbox

从网上下载了一个CSS按钮,看起来不错。然而,它在网站上太低了(运行代码片段以获取更多信息)对于凌乱的 CSS 和 HTML 感到抱歉。 (JS fiddle :https://jsfiddle.net/mffeswxs)

<!DOCTYPE html>
<html>
<head>
    <script src="script.js"></script>
    <link rel="stylesheet" type="text/css" href="style1.css">
    <link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
    <title>QuickAdvertize - Your source for quickly advertising and finding new businesses.</title>
</head>
<body>
    <center>
        <div class="flex">
            <a href="index.html" class="bttn">Home</a>
            <a href="advertise.html" class="bttn">Advertise</a>
            <a href="guides.html" class="bttn">Find</a>
        </div>
        <h1 style="text-align:center;">
            QuickAdvertize.com<br>
            <small>Your source for reliable businesses.</small>
        </h1>
        <hr width="30%">
        <br>
        <p>
            QuickAdvertize.com gives you the tools & resources to allow you to either find<br>
            or manage your business online.
        </p>
        <p id="businessamount"></p>
        <br>
        <hr width="30%">
        <h1>FAQ</h1>
        <h2>What is QuickAdvertize?</h2>
        <p>
            QuickAdvertize is a social platform that allows you to find<br>
            and upload businesses online with just a few clicks.
        </p>
        <h2>How do you find a business?</h2>
        <p>
            It's simple! Just click on Find. You can search for a business<br>
            or find businesses just by looking!
        </p>
        <h2>What is a premium business?</h2>
        <p>
            Premium businesses are companies that are developed and<br> 
            sometimes can provide better care and support with products.
        </p>
        <h2>Is a purchase required to find a business?</h2>
        <p>
            No! It's completely free, without the hassle of creating an<br>
            account.
        </p>
        <h2>Is a purchase required to upload a business?</h2>
        <p>
            Yes. However, there are multiple plans that you can pick.<br>
            <b>Guest</b> plans will take about 12-24 hours to be delivered.<br>
            <b>Popular</b> plans will take about 12-36 hours to be delivered.<br>
            <b>Expert</b> plans will take about 12-48 hours to be delivered.<br>
            Note: If the plans take more than a week to deliver, that means<br>
            there is something wrong. Please e-mail using the chat system.</p>
            <p><a href="termsofuse.html" style="font-size: 80%;">Terms Of Use</a></p>
        </center>
        <script type='text/javascript' data-cfasync='false'></script>
    </body>
</html>

最佳答案

您应该从 .flexCSS 中删除 min-height:

.flex {
    min-height: 0;
}

关于html - 网站顶部和按钮之间的空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44102438/

相关文章:

html - 我想为一个 div 创建一个书签,我希望书签包含在一个列表中

jquery - 如何使对称图像相互滚动?

html - 如何对齐 div 中的元素以使其在一行中与其他元素对齐?

html - 为什么我要指定高度 : 0 even if I specified flex-basis: 0 in CSS3 flexbox?

javascript - 移动应用程序 (html5/javascript) 与 Google App Engine 通信示例

javascript - getAttribute() 不适用于类名?

javascript - 数组被视为对象,无法 NgFor

javascript - 如何在一页中使用两个范围 slider ?

javascript - fa 图标将元素推开

html - 具有不同大小内容的相等 flexbox 网格 + 分隔符