简体   繁体   English

移动页面的滑动面板

[英]Sliding panel for mobile page

I have a div which is mostly off page but uses translation on hover to display on the main page.我有一个 div,它主要在页面外,但在悬停时使用翻译显示在主页上。

This is my site .这是我的网站

However, on mobile devices this isn't the best solution to display this div.但是,在移动设备上,这不是显示此 div 的最佳解决方案。 Hover doesn't work well and I have to click often to get it to show up.悬停效果不佳,我必须经常单击才能显示它。 I'm wondering if it's possible to do it like mobile applications where if I move the page to the right edge enough, this content will display or with a button.我想知道是否有可能像移动应用程序那样做,如果我将页面移动到足够的右边缘,此内容将显示或使用按钮。 Something like this:像这样的东西:

在此处输入图片说明

Any thoughts on if this is possible or how'd id solve this?关于这是否可能或如何解决这个问题的任何想法?

This pattern is called 'Off Canvas layout'.这种模式称为“关闭画布布局”。 Documented (with some CSS) at http://jasonweaver.name/lab/offcanvas/http://jasonweaver.name/lab/offcanvas/记录(带有一些 CSS)

There are multiple implementations you could have a look at, perhaps start with this nice demo from Zurb: http://www.zurb.com/playground/off-canvas-layouts您可以查看多种实现,也许可以从 Zurb 的这个不错的演示开始: http ://www.zurb.com/playground/off-canvas-layouts

As regards the use of hover, you're better off using a tap/click on both desktop and mobile for consistency.关于悬停的使用,您最好在桌面和移动设备上使用点击/单击以保持一致性。 The 3-bar menu button is fairly universally understood these days. 3 条菜单按钮如今已被普遍理解。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM