Our web app on desktop may use elements that use great deal of width. On many occasions we can’t simply turn these elements into columns so that they fit on a small screen. Such elements may not only fit inadequately on small screens, they could ruin the entire layout of our page if we’re not careful. In many cases, we can use a horizontal-scrolling menu to preserve the width, but keep it easily usable.

  <nav>
<a href="">Home</a>
<a href="">My Profile</a>
<a href="">Favorites</a>
<a href="">Links</a>
<a href="">Tasks</a>
<a href="">Promotions</a>
<a href="">Settings</a>
</nav>
nav {
display: flex;
overflow-x: auto; /*Allow children in nav can overflow in x direction*/
-webkit-overflow-scrolling: touch; /*Let the scroll more smoothing*/
margin: 10px 0;
} a {
margin-right: 20px;
margin-bottom: 10px;
white-space: nowrap;
}

[CSS3] Make a horizontal-scrolling Menu的更多相关文章

  1. 推荐25个帮助你提高技能的 CSS3 实战教程

    使用 CSS,你能够以极高的效率和易用性创造出美丽的设计.而目前流行的 CSS3 技术更加强大,能够创造更多丰富的效果和功能,而不需要任何外部插件.今天,我为大家收集了25个很有用的 CSS 教程,技 ...

  2. 使用HTML5、CSS3和jQuery增强网站用户体验[留存]

    记得几年前如果你需要添加一些互动元素到你的网站中用来改善用户体验?是不是立刻就想到了flash实现?这彷佛年代久远的事了.使用现在最流行的Web技术HTML5,CSS3和jQuery,同样也可以实现类 ...

  3. fullpage.js 具体使用方法

    1.fullpage.js  下载地址 https://github.com/alvarotrigo/fullPage.js 2.fullPage.js 是一个基于 jQuery 的插件,它能够很方便 ...

  4. Cai_Sublime

    Cai_Sublime Package Control:插件包管理工具 The simplest method of installation is through the Sublime Text ...

  5. WM (Constants)

    Create page WM (Constants)   Summary WM_* Constants and their definitions or descriptions and what c ...

  6. Subline Text默认设置文件Preferences.sublime-settings—Default详解

    Subline Text中,点击Preferences,选择Settings - Default 全部属性解析 // While you can edit this file, it's best t ...

  7. 打造自己个性的notepad ++

    对coder来说,notepad ++ 是一个很不错的文本编辑器.平时用来看看代码.xml文件,都比系统自带的记事本舒服得多.不过,对于像我这种每天用notepad ++写代码的人,一个原装的note ...

  8. Tabs - 选项卡插件

        接上篇Tabs  - 选项卡插件  其中12)Yet (E)Another Tab Interface没有依赖任何javascript框架,以作补充          9)Flipping C ...

  9. Sublime Text 2 -Sidebar 背景色调整为黑色

    Sublime Text 2 编辑器: Ctrl+` 输入安装代码,安装package control 插件 ctrl+shift+P : Package install 为什么装不上了呢?出现了什么 ...

  10. 【原创】Linux基础之命令行浏览器links

    有时服务器环境受限,比如在内网环境不能暴露端口从外网访问,用curl看html代码比较累,这时可以使用命令行浏览器来查看相关页面 links 官方:http://links.twibright.com ...

随机推荐

  1. go 学习成长之路

    一.go的搭建 二.初识go 三.混个脸熟--go 四.go的语言结构 五.go的常量与变量 六.go基础数据类型 七.go 条件语句 八.go 运算符 九.go条件语句switch 十.go循环语句 ...

  2. sql 全站搜索

    SQL全站搜索 create proc Full_Search(@string varchar(50)) as begin declare @tbname varchar(50) declare tb ...

  3. nginx深入

    1.编译安装配置完成 /opt/nginx11/html/index.html 这是网页的首页文件 2. nginx.conf主配置文件学习 ############################# ...

  4. applicationContext.xml配置AOP切面编程

    Computer.java package com.wh.aop2; public class Computer { public void play01(){ System.out.println( ...

  5. springMVC是什么等七个问题

  6. Java—将文件夹压缩为zip文件

    import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java ...

  7. OpenCV绘制检测结果

    OpenCV绘制检测结果 opencv  rtcp  timestamp  一.介绍 由于在验证阶段,使用FPGA时我们的算法检测速度很慢,没法直接在主流上进行绘图,否则的话,主流就要等待算法很久才能 ...

  8. Caffe:导入caffePython-PyQt failed

    在另一台电脑上使用caffe python版本,显示 Backend Qt5Agg is interactive backend. Turning interactive mode on.       ...

  9. (转)Hibernate关联映射——一对多(多对一)

    http://blog.csdn.net/yerenyuan_pku/article/details/70152173 Hibernate关联映射——一对多(多对一) 我们以客户(Customer)与 ...

  10. 使用GetMirror一次镜像多个实体

    public static void GetMirror(this ObjectIdCollection ids, Point3d p1, Point3d p2, bool s, params Ent ...