<header class='header'>
        <div class='logo'>Logo</div>
        <nav class='nav'>
            <a href='#'>Home</a>
            <a href='#'>Services</a>
            <a href='#'>About</a>
            <a href='#'>Contact</a>
        </nav>
    </header>
    <section class='hero-section'>
        <div class='hero-text'>
            <h1>Welcome to our website</h1>
            <p>We offer the best services for your needs</p>
            <button>Learn more</button>
        </div>
    </section>
<style>
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background-color: #fff;
        box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    }
<pre><code>.logo {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav a {
    margin: 0 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.nav a:hover {
    color: #007bff;
}

.hero-section {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
}

.hero-text {
    text-align: center;
    color: #fff;
}

.hero-text h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 24px;
    margin-bottom: 40px;
}

.hero-text button {
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.hero-text button:hover {
    background-color: #0056b3;
}
</code></pre>
</style>

原文地址: https://www.cveoy.top/t/topic/mLOB 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录