【问题标题】:How to remove sides padding from Google Adsense 320x50 mobile ad in Twitter Bootstrap?如何从 Twitter Bootstrap 中的 Google Adsense 320x50 移动广告中删除边距?
【发布时间】:2012-08-07 14:51:11
【问题描述】:

在使用 Twitter Bootstrap 并尝试实施 320 x 50 移动横幅广告时,我遇到了一个问题,即在移动设备上,横幅会在左侧(也可能在右侧)有填充。

【问题讨论】:

    标签: mobile twitter-bootstrap adsense


    【解决方案1】:

    Bootstrap 会自动在您的身体周围创建一个 20 像素的填充。要删除它,就像对移动导航栏所做的那样,在引导响应文件中实现一个新类:

    @media (max-width: 767px) {
    body {        // The code that creates a padding around the body in mobile
        padding-right: 20px;
        padding-left: 20px;
    }
    .google-adsense,   // Create a new class for your ad with -20 margins (The navbar
                       // is already implemented like this so just add new class name)
    .navbar-fixed-top,
    .navbar-fixed-bottom {
        margin-right: -20px;
        margin-left: -20px;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-18
      • 2016-01-06
      • 2016-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多