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;
}

最新文章

  1. 贝赛尔曲线UIBezierPath(后续)
  2. CoreGraphics-线段常见属性及渲染模式介绍
  3. Storm入门1-基本概念
  4. Sql服务定时重启
  5. 在VPS上搭建SS访问火星
  6. 自定义ViewGroup
  7. Java学习笔记(六)
  8. asp.net 错误跳转
  9. Ubuntu下MySQL忘记root密码重置
  10. SequoiaDB 与 Hive 集成
  11. php中运用GD库实现简单验证码
  12. hdu 5641 King&#39;s Phone(暴力模拟题)
  13. python模块介绍- xlwt 创建xls文件(excel)
  14. 解决MSSQL 2008不能用IP登录的问题
  15. Single Number leetcode
  16. WPF 快捷方式
  17. Windows资源
  18. pwd
  19. .NET Core实战项目之CMS 第十二章 开发篇-Dapper封装CURD及仓储代码生成器实现
  20. 自建 Gitlab (邮箱配置、拆分 PostgreSQL、Redis) + 随想

热门文章

  1. 微信小程序调用微信支付
  2. php微信开放平台--第三方网页微信扫码登录(OAuth2.0)
  3. 点击文字弹出一个DIV层窗口代码 【或FORM表单 并且获取点击按钮的ID值】
  4. [转]Linux下paste命令详解
  5. Java系列学习(十一)-内部类
  6. python基础篇(一)-------- 字符串的操作
  7. Mac sierra下 wget安装
  8. 微信自定义分享功能实现Tips
  9. css的基本单词
  10. Centos 安装 Moosefs文件系统