We can take advantage of sticky positioning to keep a section header at the top of the page while the user scrolls. This is useful for neat categorisation of sections on the page.

  <dl>
<dt>Premier League</dt>
<dd>Brighton & Hove Albion 2 - 2 AFC Bournemouth</dd>
<dd>Burnley 1 - 2 Liverpool</dd>
<dd>Leicester City 3 - 0 Huddersfield Town</dd>
<dd>Stoke City 0 - 1 Newcastle United</dd>
<dd>Everton 0 - 1 Manchester United</dd> <dt>Championship</dt>
<dd>Bolton Wanderers 1 - 0 Hull City</dd>
<dd>Derby County 1 - 1 Sheffield United</dd>
<dd>Leeds United 0 - 0 Nottingham Forest</dd>
<dd>Norwich City 2 - 1 Millwall</dd>
<dd>Preston North End 2 - 3 Middlesbrough</dd>
<dd>Queens Park Rangers 2 - 1 Cardiff City</dd>
<dd>Sheffield Wednesday 0 - 3 Burton Albion</dd>
<dd>Sunderland 0 - 1 Barnsley</dd>
<dd>Aston Villa 3 - 0 Bristol City</dd> <dt>League 1</dt>
<dd>AFC Wimbledon 2 - 0 Southend United</dd>
<dd>Bristol Rovers 2 - 1 Portsmouth</dd>
<dd>Charlton Athletic 1 - 2 Gillingham</dd>
<dd>Fleetwood Town 1 - 2 Bradford City</dd>
<dd>Northampton Town 0 - 1 Wigan Athletic</dd>
<dd>Oxford United 3 - 1 Milton Keynes Dons</dd>
<dd>Peterborough United 1 - 1 Doncaster Rovers</dd>
<dd>Plymouth Argyle 1 - 0 Walsall</dd>
<dd>Rochdale 1 - 2 Blackpool</dd>
<dd>Rotherham United 1 - 1 Blackburn Rovers</dd>
<dd>Scunthorpe United 1 - 0 Bury</dd>
<dd>Shrewsbury Town 1 - 0 Oldham Athletic</dd>
</dl>
dl {
font-size: 30px;
} dt {
background-color: mediumseagreen;
position: sticky; /*sticky positioning*/
position: -webkit-sticky;
top:;
} dd {
padding: 20px 0;
}

[CSS3] Use Sticky Positioning for Section Headers的更多相关文章

  1. ConfigParser.MissingSectionHeaderError: File contains no section headers.

    今天使用ConfigParser解析一个ini文件,报出如下错误: config.read(logFile) File "C:\Python26\lib\ConfigParser.py&qu ...

  2. python ConfigParser读取配置文件,及解决报错(去掉BOM)ConfigParser.MissingSectionHeaderError: File contains no section headers的方法

    先说一下在读取配置文件时报错的问题--ConfigParser.MissingSectionHeaderError: File contains no section headers 问题描述: 在练 ...

  3. 【问题解决方案】CentOS7替换yum的问题:使用yum makecache出现File contains no section headers

    参考链接 CentOS7替换yum的问题:使用yum时出现File contains no section headers centos安装网络repo源及错误说明 一.centos替换yum的步骤 ...

  4. Android7.0后JNI库必须保留Section Headers

    此修改在官网的描述如下: Each ELF file has additional information contained in the section headers. These header ...

  5. css3 position:sticky

    最近在写一个小程序,项目中遇到一个需求:页面滚动到tab切换菜单时,菜单fixed到页面顶部: 实现方法: 使用小程序的onPageScroll事件,滚动到指定位置添加fixed样式: bug1:获取 ...

  6. raise missingsectionheadererror:file containe no section headers问题解决

    本人亲测,遇到这个问题,就换到管理员方式运行命令 因为太小白,所以这次重新装包的时候切换到D盘了,想着省一点儿C盘内存,结果,每次pip install安装的时候都是这个问题,中间还有什么反序列失败, ...

  7. CentOS7使用yum时File contains no section headers.解决办法

    本文转载于  https://blog.csdn.net/trokey/article/details/84908838 安装好CenOS7后,自带的yum不能直接使用,使用会出现如下问题: 原因是没 ...

  8. CSS3与页面布局学习总结(三)——BFC、定位、浮动、7种垂直居中方法

    一.BFC与IFC 1.1.BFC与IFC概要 BFC(Block Formatting Context)即“块级格式化上下文”, IFC(Inline Formatting Context)即行内格 ...

  9. CSS3与页面布局学习总结(四)——页面布局大全BFC、定位、浮动、7种垂直居中方法

    目录 一.BFC与IFC 1.1.BFC与IFC概要 1.2.如何产生BFC 1.3.BFC的作用与特点 二.定位 2.2.relative 2.3.absolute 2.4.fixed 2.5.z- ...

随机推荐

  1. Django返回json给钱前台的方法

    return HttpResponse(simplejson.dumps(resource.update_status, ensure_ascii=False))

  2. 安装office1406错误!!!急死个人。。。。。

    因为用到Microsoft.Office.Interop.Word,将word转PDF.所以在服务器上需要安装office,但是报错1406,不能将值插入注册表..... 然后百度各种问题,说需要将注 ...

  3. vs项目结构解析

    当我们用VS开发一个项目的时候,首先应该清楚用VS这个IDE生成的一些文件和文件夹是什么意思,起什么作用,什么场合下使用. 因为我使用的是VS2015,就以这个为例来进行一些说明: 首先要做的是更改你 ...

  4. [hihocoder][Offer收割]编程练习赛58

    最大的K-偏差排列 每次取可选范围里的最大的数字,如果最左侧的数字还没有使用就直接使用最左侧的数字 #pragma comment(linker, "/STACK:102400000,102 ...

  5. 模拟测试—moq:简单一两句

    在Xunit的基础上,说话模拟测试. 假如我们有这样一个控制器里面有这样一个方法,如图 我们在对Bar测试得时候,如果测试未通过,错误有可能来至于Bar,也有可能错误来至于serverde Foo方法 ...

  6. Burn Down Chart(2018.6.4~2018.6.10)

    Burn Down Chart (2018.6.4~2018.6.10) 娄雨禛[前端部分] 曾子轩[后端部分+燃尽图] 前端 1. 娄雨禛+李鑫 1)在总工程中完成跳转,实现图片显示,并发布到Git ...

  7. pengyue-form 模块 dropdown 关系联动

    <script> window.onload=function() { var school= document.getElementById("dnn_ctr5973_View ...

  8. CentOS7配置VSFTP服务器

    [1] 安装VSFTP [root@localhost ~]# yum -y install vsftpd [2] 配置vsftpd.conf文件 [root@localhost ~]# vi /et ...

  9. Pycharm:debug调试时使用参数

    一种操作方法: 文章链接:MAC下使用Pycharm,debug调试时怎样带参数 今天在网上找了一个例子敲代码,因为我使用的是PyCharm,例子运行时需要带参数,开始不知道怎么带参数,网上搜了大半天 ...

  10. hibernate Hql 更新的参数只能设置String类型

    最近在项目中发现一个奇怪的现象,请看下面的代码 实体类MyEmployeeEntity @Table(name="myemployee") public class MyEmplo ...