Android devices by default are easier to scroll on, so you don’t need to worry here. However, as of Safari 13 this is the default behaviour. It's important to use the -webkit-overflow-scrolling as this adds momentum and ease of use to scrolling areas. ![]() ms-overflow-style: -ms-autohiding-scrollbar /* */ } : Hide the ugly scrollbars in Edge until the scrollable area is hovered : Make it smooth scrolling on iOS devices before : Automatic overflow means a scroll bar won’t be present if it isn’t needed ![]() : All items a forced onto a single line, causing the overflow when necessary. This small amount of CSS will make any area have horizontal scrolling. You need to make sure items don't wrap otherwise, it will behave normally and allowing scrolling using auto means scrolling will be available when necessary. The two properties that do the work here are white-space: nowrap and overflow-x: auto. Just apply the styles, to whichever element you prefer. Whether you have it positioned by your logo, it will work. The implementation is flexible to work with your layout. So why not navigation? The navigation is always visible, although some of the items may not, this is an advantage over hiding the navigation completely. You see this pattern used throughout apps and galleries. On touch screen devices swiping horizontally is much more natural and fluid (especially on iOS), than horizontal scrolling on a computer-for the most part at least. ![]() So why would a horizontal navigation be any better? It can be a little inconvenient if you don’t find what you wanted as part of the navigation. You’ve still got the same issues, and it doesn’t tend to be too apparent you’ve jumped down the page. Simply, it is no better than the ‘hamburger’. Especially on a site where you want the content to be consumed, it could become tedious to scroll past navigation every single you tap a link. Although it’s highly accessible from the off, however, I think you can push the more valuable content, you would want the visitor to see initially. Anything list likeĪ list like menu can get in the way of the page itself. It then comes down to which is more inconvenient for the user as there are some good examples for using bottom navigation on a website. Centralising it in the viewport to the left or right can obscure content, which in turn will be equally as annoying. The way that Mobile Safari on iOS works is terrible for anything fixed towards the bottom of the viewport. Generally fixed elements because they require two taps Visibility being the core reason to explore different options, there are other things that would be ideal to avoid. Which in turn is why it’s was deemed unsuccessful, in terms of engagement. What made the ‘hamburger’ menu so successful was how discrete and easy it was just to shove away all those items. What we want to avoid when creating this menu So in this post the aim is to use only CSS for a horizontal scrolling navigation. It’s a pattern that could be an ideal replacement for the ‘hamburger’ menu. It’s tricky, because we aren’t afforded the same space native apps get.Īlthough I’m certainly not the first to use this idea, it has been used in early versions of the Facebook app and it’s being used on some pages on the Apple website. Something which doesn’t involve the ‘hamburger’ toggle icon. I’ve been wondering for a while now about an alternative approach to responsive navigation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |