css FMG iPad /平板电脑响应

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css FMG iPad /平板电脑响应相关的知识,希望对你有一定的参考价值。

@media only screen and (min-width: 481px) and (max-width: 768px) {
  *{
    box-sizing: border-box;
  }
  body {
    min-width: 100%;
    overflow: auto;
  }
  .container{
    width: 100% !important;
  }
  #content {
    width: 100% !important;
    padding: 5px;
  }
  #content article{
    width: 100% !important;
    float: none;
    overflow: hidden;
  }
  #content aside{
    width: 100% !important;
    margin-left: 0;
  }
  img.inline-image {
    width: 100%;
  }
  iframe {
    display: block;
    float: none;
    width: 100%;
  }

  header {
    background: #FFF none;
    background-image: none;
    height: auto;
  }
  header .backgroundImage {width: 100%;height: auto;}
  header .fauxLogoImageMap, header .fauxLogoImagemap {margin-top: 0;margin-left: 0px;width: 100%;height: auto;float: none;}
  header .fauxLogoImageMap img, header .fauxLogoImagemap img {width: 95% !important;height: auto;}
  header .socialMedia {display: none;}

  #hero {
    display: none;
  }

  nav#main {
    /*background: #D3D4D8;*/
    min-height: 40px; 
    position: relative;
    top: auto;
  }

  nav#main a.homeButton{
    display: inline-block; /* remove FMG home icon image */
    float: left;
  }

  nav#main a + a, nav#main li a + a{
    display: inline-block  !important;
    float: right;
    margin-top: -50px;
  }

  nav#main #navButton {
    float: right;
    padding: 10px 0;
    margin: 0 20px 0 0;
    background-position-x: 60px;
    background-position-y: 8px;
    text-decoration: none;
  }

  nav#main #navButton:after {
    content: '\f0c9';
    font-family: FontAwesome;
    display: inline-block;
    margin-left: 5px;
  }

  nav#main ul{
    padding-top: 40px;
    display: none;
    /*background-color: #D3D4D8;*/
  }
  nav#main li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 0 0 0;
    line-height: 2;
    background-image:url(http://static.contentres.com/site/templates/global/img/mobile-sprite.png);
    background-position: 0 -375px;
    background-repeat: repeat-x;
    /*border-top: 1px solid #035EB3;*/
  }

  nav#main li:after{  
    content: "";
    display: table;
    clear: both;
}

  nav#main li.first {display: none;}

  nav#main .subnavButton{
  position: relative;
  /* top: 8px; */
  display: inline-block;
  width: 27px;
  height: auto;
  /* float: right; */
  /* margin: 0 20px 0 0; */
  /* background: url('http://static.contentres.com/site/templates/global/img/mobile-sprite.png') no-repeat 0px -21px; */
  text-align: center;
  }

nav#main .subnavButton:after {
  content: '\f107';
  font-family: FontAwesome;
  display: block;
  /* margin-left: 5px; */
  position: absolute;
  right: 0;
  top: 0;
  margin: auto;
  left: 0;
  bottom: 0;
}

  nav#main li ul {
    left: 0;
    position: relative;
    width: 100%;
    top: 0;
    margin-left: 0;
    padding: 0;
  }

  nav#main li ul a{
    font-size: 14px;
    float: none;
  }


  #content div.rule {
    width: 98%;
    margin-left: auto;
    margin-right: auto;
  }

  .home-side {
      overflow: hidden;
  }
  .home-side .box, .home-side .box-last {
      width: 33%;
      height: 188px;
      margin: 0;
      padding: 1%;
      position: relative;
  }
  .home-side .box p, .home-side #riskalyze-btn-container {
    top: auto !important;
    bottom: 10px;
    position: absolute !important;
    width: 94%;
    margin: 0 3%;
  }
  .home-side #riskalyze-btn-container a{
    height: 26px;
    margin: 0;
  }

  .sidebarWidget {
    border-top: 2px solid #EEE;
    padding-top: 25px;
  }
  .sidebarWidget .wrapper {
    padding: 0;
  }

  #additional{
    width: 100% !important;
    padding: 20px !important;
  }
  #additional .wrapper {
    padding: 0 0 20px 0;
  }
  #additional .content {
    width: 50% !important;
    float: left;
    margin-left: 0;
    padding: 3px 0 3px 10px;
  }
  #additional .left {
    padding-right: 10px;
    padding-left: 0;
  }

  #suggested {
    border-top: 2px solid #EEE;
    overflow: hidden;
    padding-top: 40px;
  }
  #suggested .content {
    width: 33% !important;
    padding: 10px 1% !important;
    margin: 0 !important;
  }
  #suggested .content img {
      width: 100%;
      max-width: 190px;
  }

  #matterContent .featured {
    position: relative;
    overflow: hidden;
  }
  #matterContent div.featured:first-child {
    border-bottom: 1px dashed #DDD;
  }

  footer .note{
    width: 100%;
    float: none;
  }
  footer aside{
    width: 100%;
    margin-left: 0;
    margin-top: 40px;
    overflow: hidden;
  }
  footer aside .wrapper{
    padding: 0;
    overflow: hidden;
  }
  footer aside .contact {
    float: left;
    width: 50%;
  }
  footer aside .quickLinks {
    margin-left: 0;
    width: 50%;
    float: left;
  }
}

以上是关于css FMG iPad /平板电脑响应的主要内容,如果未能解决你的问题,请参考以下文章

css FMG Pin保护页面形式样式

css FMG附加内容图标导航栏

css FMG旋转器图像替换

css FMG学习内容

CSS继承不应用样式

ipad css 响应式网站错误