zoukankan      html  css  js  c++  java
  • 响应式导航

      

    <!DOCTYPE>
    <html>
      <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="apple-mobile-web-app-status-bar-style" content="blank" />
        <meta name="format-detection" content="telephone=no" />
        <style>
          @media screen and (max-320px){
            .logo{height: 40px}
            .header{height:40px;}
            li{
              line-height: 50px; 
              padding:0 15px 0 15px;
              display: block;
              background-color: #333;
              text-align: center;
              border-top:1px solid white;
            }
              .logo{display:block;}
          }
    
          @media screen and (min-320px) and (max- 765px){
            .logo{height: 50px}
            .header{height:50px;}
            li{
              line-height: 50px; 
              padding:0 15px 0 15px;
              display: block;
              background-color: #333;
              text-align: center;
              border-top:1px solid white;
            }
            .logo{display:block;}
          }
    
          @media screen and (min-765px){
            .logo{height: 60px}
            .header{height:60px;}
             li{display: block; line-height: 60px; float:left; padding:0 15px 0 15px;}
            .logo{display:block; float:left;}
          }
          body{margin: 0}
          .container{width:80%;margin:auto; }
          .header{background-color: #333;}
          li a{color:white;}
    
        </style>
      </head>
      <body>
        <div class="header">
          <div class="container">
            <img class="logo" src="http://l.ruby-china.org/assets/text_logo-3609989243456a4c620bf2342986b638.png"/>
            <li><a href="#">热门帖子</a></li>
            <li><a href="#">精华帖子</a></li>
            <li><a href="#">最新原创</a></li>
            <li><a href="#">文档翻译</a></li>
          </div>
        </div>
      </body>
    </html>

  • 相关阅读:
    java相关的流
    矩阵的行列式
    C语言链表逆序问题(附图解)
    RSA算法
    window.onload的用法
    linux中搜索文件内容关键字
    java.net.BindException: Address already in use: 解决方法
    设计模式之装饰者decorator模式
    java.lang.reflect.InvocationTargetException: null(已解决)
    mitmproxy 脚本启动
  • 原文地址:https://www.cnblogs.com/littlewriter/p/6672034.html
Copyright © 2011-2022 走看看