zoukankan      html  css  js  c++  java
  • 学写网页 #02# 无题

    参照物

     

    v1

    <!DOCTYPE html>
    <html>
    
        <head>
            <meta charset="utf-8" />
            <title>My Picture List</title>
            <link rel="stylesheet" href="css/hello.css" />
        </head>
    
        <body>
            <main>
                <div id="classification">
                    <a href="index.html" class="tag"><span>萌物</span></a>
                    <a href="index2.html" class="tag"><span>风景</span></a>
                </div>
                <div id="picture-panel">
                    <div id="picture-box"><img src="img/6.jpg" alt="" /></div>
                    <div id="picture-box"><img src="img/7.jpg" alt="" /></div>
                </div>
            </main>
            <footer></footer>        
        </body>
    </html>
    #picture-box {
        display: inline-block;
        width: 12em;
        height: 12em;
        overflow: hidden;
        margin-top: 0;
        margin-right: 12px;
        margin-bottom: 12px;
        margin-left: 0;
    }

     应该用 class .... tips: 始终优先考虑使用 class 而不是 id ,除非只使用一次

    v2

    看上去好像是这么回事,实际上。。。 (手动捂脸

    #classification {
        margin-top: 0.5em;
        margin-bottom: 0.5em;    
    }
    
    .tag {
        background-color: #009688;
        border-color: #009688;
        border-radius: 3px;
        box-shadow: 0 2px 2px 0 rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.08);
        display: inline-block;
        margin-right: 8px;
        padding: 0 16px;
    }
    
    .tag span {
        color: rgba(255,255,255,.8);
        display: inline-block;
        font-size: 14px;
        font-weight: 300;
        line-height: 49px;
        text-decoration: none;
        white-space: nowrap;
    }
    
    #picture-box {
        display: inline-block;
        width: 220px;
        height: 220px;
        overflow: hidden;
        margin-top: 0;
        margin-right: 12px;
        margin-bottom: 12px;
        margin-left: 0;
    }
    
    img {
        height: 100%;
    }
  • 相关阅读:
    Netty学习(四)-TCP粘包和拆包
    Netty学习(三)-Netty重要接口讲解
    Netty学习(二)-Helloworld Netty
    Netty学习(一)-为什么选择Netty
    java学习-NIO(五)NIO学习总结以及NIO新特性介绍
    java学习-NIO(四)Selector
    哈希表 HashTable(又名散列表)
    设计模式-外观模式
    设计模式-装饰模式
    设计模式-适配器模式
  • 原文地址:https://www.cnblogs.com/xkxf/p/8524743.html
Copyright © 2011-2022 走看看