css-homework2

<!DOCTYPE html>
<html>
    <head>
        <title>HTML5 Layout</title>
        <style>
            body{
                background-image: url(img/dark-wood.jpg)
            }
            *{
                margin: 0;
                padding: 0;
                /* border: 1px dashed black; */
            }
            .wrapper{
                width: 960px;
                margin: 0 auto;
                
            }
            header{
                margin-top: 30px;
                height: 122px;
                background-image: url(img/header.jpg);
                
            }
            nav{
                
                height: 40px;
                position: relative;
                top: 80px;
                background-color: #B8B8B8;
            }
            ul>li{
                
                float: left;
                width: 90px;
                overflow: hidden;
                
                margin-top: 10px;
            }
            
            ul>li>a{
                
                color: white;
                text-decoration: none;
                font-size: 18px;
                text-align: center; 
            }
            .current{
                color: #000000;
                margin-left: 10px;
            }
            
            
            footer{
                height: 60px;
                background: #ADFF2F;
            }
            .courses{
                float: left;
                width: 77%;
                overflow: auto;
                margin-top: 30px;
                
            }
            article{
                background-color: #FFFFFF;
                height: 350px;
                
                background-color: white;
            }
            
            figure{
                float: left;
                width: 295px;
                height: 220px;
                padding: 5px;
                margin: 20px;
                border: 1px solid #eee;
            }
            
            
            hgroup>h2{
                padding-top: 30px;
            }
            hgroup>h3{
                margin-bottom: 10px;
                color: #de6581;
            }
            
            aside{
                margin-top: 40px;
                float: left;
                width: 25%;
                height: 700px;
                background-color:white ;
            }
            footer{
                clear: both;
                height: 30px;
                background-color: #B8B8B8;
            }
            aside {
                width: 220px;
                float: left;
            }
            article:last-child{
                margin-top: -10px;
            }
            aside>section>a {
                display: block;
                padding: 10px;
                border-bottom: 1px solid #eee;
            }
            
            aside>section>a:hover {
                color: #985d6a;
                background-color: #efefef;
            }
            
            a {
                color: #de6581;
                text-decoration: none;
            }
            
            h2 {
                margin: 10px 0 5px;
            }
            
            h3 {
                color: #de6581;
                padding: 0 0 20px;
            }
            
            aside>section>h2 {
                padding: 30px 0 20px;
                color: #de6581;
            }
            
            
        </style>
    </head>
    
    <body>
        
        <div class="wrapper">
            <header>
                <h1>&nbsp;</h1>
                <nav>
                    <ul>
                        <li><a href="" class="current">home</a></li>
                        <li><a href="">classes</a></li>
                        <li><a href="">catering</a></li>
                        <li><a href="">about</a></li>
                        <li><a href="">contact</a></li>
                    </ul>
                </nav>
            </header>
            
            <section class="courses">
                
                <article>
                    <figure>
                        <img src="img/bok-choi.jpg" alt="Bok Choi" />
                        <figcaption>Bok Choi</figcaption>
                    </figure>
                    <hgroup>
                        <h2>Japanese Vegetarian</h2>
                        <h3>Five week course in London</h3>
                    </hgroup>
                    <p>A five week introduction to traditional Japanese vegetarian meals, teaching you a selection of rice and noodle dishes.</p>
                </article>
                    
                <article>
                    <figure>
                        <img src="img/teriyaki.jpg" alt="Teriyaki sauce" />
                        <figcaption>Teriyaki Sauce</figcaption>
                    </figure>
                    <hgroup>
                        <h2>Sauces Masterclass</h2>
                        <h3>One day workshop</h3>
                    </hgroup>
                    <p>An intensive one-day course looking at how to create the most delicious sauces for use in a range of Japanese cookery.</p>
                </article> 
                   
            </section>
            
            <aside>
                <section class="popular-recipes">
                    <h2>Popular Recipes</h2>
                    <a href="">Yakitori (grilled chicken)</a>
                    <a href="">Tsukune (minced chicken patties)</a>
                    <a href="">Okonomiyaki (savory pancakes)</a>
                    <a href="">Mizutaki (chicken stew)</a>
                </section>
                <section class="contact-details">
                    <h2>Contact</h2>
                    <p>Yoko's Kitchen<br />
                        27 Redchurch Street<br />
                        Shoreditch<br />
                        London E2 7DP</p>
                </section>
            </aside>
            
            <footer>
                &copy; 2011 Yoko's Kitchen
            </footer>
            
        </div>
        
    </body>
</html>
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容