[英]Zurb for apps fixed menu footer
I am using the following code to try and achieve a fix menu bar at the bottom of our web app like you would commonly see in a standard iOS app. 我正在使用以下代码来尝试在我们的Web应用程序底部实现一个修复菜单栏,就像您通常在标准iOS应用程序中看到的那样。 The only problem is that when the content extends the boundaries of the window the menu is being pushed down
唯一的问题是,当内容扩展窗口的边界时,菜单将被下推
!!!
%html{:lang => 'en', 'ng-app' => 'foundation', 'zf-esc-close' => ''}
%head
%meta{:content => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type'}/
%meta{:charset => 'utf-8'}/
%meta{:content => 'width=device-width, initial-scale=1.0', :name => 'viewport'}/
%title= content_for?(:title) ? yield(:title) : "Bean'n'Gone"
= stylesheet_link_tag 'application'
%script{:src => 'https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js'}
= javascript_include_tag 'application'
= csrf_meta_tags
%body
.grid-frame.vertical
.title-bar
= link_to image_tag('logo.png', size: '152x70'), root_url, class: 'center title'
.grid-block
#main.small-12.grid-block
= yield
.grid.content.shrink
%ul.menu-bar
%li
%a{href:menu_items_url}
%img{icon: 'magnifying-glass', size: 'medium', 'zf-iconic': ''} Coffees
%li
%a{href: orders_url}
%img{icon: 'document', size: 'medium', 'zf-iconic': ''} Orders
%li
%a{href: edit_person_registration_url}
%img{icon: 'person', size: 'medium', 'zf-iconic': ''} Account
%li
%a
%img{icon: 'cart', size: 'medium', 'zf-iconic': ''} Checkout
fixed the issue by changing the menu to a grid-block like below 通过将菜单更改为如下所示的网格块来解决此问题
!!!
%html{:lang => 'en', 'ng-app' => 'foundation', 'zf-esc-close' => ''}
%head
%meta{:content => 'text/html; charset=UTF-8', 'http-equiv' => 'Content-Type'}/
%meta{:charset => 'utf-8'}/
%meta{:content => 'width=device-width, initial-scale=1.0', :name => 'viewport'}/
%title= content_for?(:title) ? yield(:title) : "Bean'n'Gone"
= stylesheet_link_tag 'application'
%script{:src => 'https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js'}
= javascript_include_tag 'application'
= csrf_meta_tags
%body
.grid-frame.vertical
.title-bar
= link_to image_tag('logo.png', size: '152x70'), root_url, class: 'center title'
.grid-block
#main.small-12.grid-block
= yield
- if person_signed_in?
.grid-block.shrink
.grid.content.small-12
%ul.menu-bar
%li
%a{href: menu_items_url}
%img{icon: 'magnifying-glass', size: 'medium', 'zf-iconic' => ''} Coffees
%li
%a{href: orders_url}
%img{icon: 'document', size: 'medium', 'zf-iconic' => ''} Orders
%li
%a{href: people_url}
%img{icon: 'person', size: 'medium', 'zf-iconic' => ''} Account
%li
%a{href: cart_items_url}
%img{icon: 'cart', size: 'medium', 'zf-iconic' => ''} Checkout
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.