0

我正在为移动访问者使用https://github.com/jasny/jquery.smartbanner/。不幸的是,它将横幅放在我的网站标题顶部,使徽标、搜索和菜单按钮不可见。

有没有办法让 SmartBanner 下推我网站的其余部分?

我的html是:

<body>
<div id="page" class="site" data-role="page">
  <!-- header -->
  <header id="masthead" class="site-header" data-role="header" data-position="fixed">
  <div id="view-search" class="view-search ">
    <a href="#"><i class="icon-search"></i></a>
  </div>

我正在为 WordPress 插件使用 WPSmart - http://wordpress.org/plugins/wpsmart-mobile/

4

2 回答 2

1

在你的脑海中使用

<meta name="smartbanner:disable-positioning" content="true">

在您可以在自己的 css 中更改 .smartbanner 到您想要的位置之后

于 2018-01-03T11:00:28.040 回答
0

这是我使用的,它目前对我很有用。当 smartbanner 显示时(js 库中的第 131 行),添加:

$('html').css('position', 'relative');

然后,我们需要做的就是定位智能横幅。转到第 136 + 140 行并将“top :0”更改为:

top:'-'+ this.origHtmlMargin (this.bannerHeight*this.scale)
于 2014-10-16T22:38:39.983 回答