gpt4 book ai didi

css - foundation sticky Offcanvas 菜单不适用于 foundationpress 主题

转载 作者:太空宇宙 更新时间:2023-11-03 17:47:16 25 4
gpt4 key购买 nike

这是我的网站:http://fspb.valse.com.my/

offcanvas 菜单不工作。我试过这个 fiddle :http://jsfiddle.net/KBne4/12/ .

在我使用 foundation5 的正常站点中它工作。但是当我使用 Foundationpress 主题(foundation + wordpress)时它不起作用。

CSS

.off-canvas-fixed {
-webkit-transition: -webkit-transform 500ms ease;
transition: transform 500ms ease;




}
.left-off-canvas-toggle > .off-canvas-fixed {
-webkit-transform: translate3d(15.625rem, 0, 0);
transform: translate3d(15.625rem, 0, 0);
height:100%;

}
.left-off-canvas-menu {
-webkit-transform: none;
transform: none;
margin-left: -15.625rem;
height: 100%;

}
.main-section {
padding:45px 0 0;

}
.tab-bar {
width:100%;

}
@media only screen and (orientation:landscape) and (max-width: 64em){
.main-section {
padding:0 0 0 2.8125rem;
}
.off-canvas-fixed {
width:2.8125rem;
height:100%;
background:#333333;
}
section.left-small{
border:none;
box-shadow:none;
}
}

HTML

<div class="off-canvas-wrap">
<div class="fixed off-canvas-fixed hide-for-large-up"> <a class="exit-off-canvas"></a>

<nav class="tab-bar">
<section class="left-small"> <a class="left-off-canvas-toggle menu-icon" href="#"><span></span></a>

</section>
<section class="show-for-portrait right tab-bar-section">
<h1 class="title">Logo</h1>

</section>
</nav>
<aside class="left-off-canvas-menu">
<ul class="off-canvas-list">
<li class="show-for-small">

</li>
<li><a href="index.php">home</a></li>
<li><a href="productlisting.php" class="selected">product</a></li>
<li><a href="">help</a></li>

<li><a href="">contact</a></li>
<li><a href="">login/sign up</a></li>
</ul>
</aside>
</div>
<div class="inner-wrap"> <a class="exit-off-canvas"></a>

</div>
</div>

脚本

//粘性 Canvas

wp_register_script('my_amazing_script12', 'http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js', array('jquery'),'1.1', false);
wp_register_script('my_amazing_script13', 'http://cdnjs.cloudflare.com/ajax/libs/foundation/5.0.2/js/foundation.min.js', array('jquery'),'1.1', false);

wp_enqueue_script('my_amazing_script12');
wp_enqueue_script('my_amazing_script13');
}


add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts');

最佳答案

foundation 5 offcanvas 设置需要 2 个包装器,而不仅仅是 1 个:

<div class="off-canvas-wrap" data-offcanvas>
<div class="inner-wrap">
...
</div>
</div>

你在 .inner-wrap 之外构建了所有东西,所以它不起作用:)

参见引用手册 http://foundation.zurb.com/docs/components/offcanvas.html#basic

关于css - foundation sticky Offcanvas 菜单不适用于 foundationpress 主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27935786/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com