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>

  • 相关阅读:
    visual studio 2010设置
    Win7 x64 PL/SQL 连接 Oralce 提示 Could not initialize "%ORACLE_HOME%\bin\oci.dll"
    jxl导入/导出excel
    struts2的action与jsp之间传递参数
    web服务器、容器和中间件
    myeclipse trial expired 注册码解决办法(可用于8.5)
    Java中的内部类
    JS的trim()方法
    struts2 <s:property>用法
    EL表达式的使用
  • 原文地址:https://www.cnblogs.com/littlewriter/p/6672034.html
Copyright © 2011-2022 走看看