0
当使用Twitter Bootstrap并试图实现320x50的移动横幅广告时,我遇到了一个问题,在移动设备上,横幅会在左侧填充(也可能是右侧)。如何在Twitter Bootstrap中删除Google Adsense 320x50移动广告中的边距?
当使用Twitter Bootstrap并试图实现320x50的移动横幅广告时,我遇到了一个问题,在移动设备上,横幅会在左侧填充(也可能是右侧)。如何在Twitter Bootstrap中删除Google Adsense 320x50移动广告中的边距?
Bootstrap会自动在身体周围创建一个20px的填充。为了消除这一点,就像移动导航栏所做的那样,在引导响应文件中实现一个新类:
@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;
}