<!DOCTYPE html>
<html lang="zh-cn">
<head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <title>Bootstrap 101 Template</title>
   <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
   <style type="text/css">
   .content {
     width: 500px;
     margin: 50px 50px;
     }
     .header {
     line-height: 50px;
     background-color: #ECECEC;
     }
     .data {
     height: 300px;
     overflow: hidden;
     }
     </style>
     </head>
     <body>
     <div class="content">
     <div class="header row">
     <div class="col-md-3">姓名</div>
     <div class="col-md-3">性别</div>
     <div class="col-md-3">年龄</div>
     <div class="col-md-3">职业</div>
     </div>   
     <div class="data">
     <div class="data-content">
     <table class="table table-hover">
     </table>
     </div>
     <div class="data-footer"></div>
     </div></div><script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js">
     </script><script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
     <script type="text/javascript">
     var html = '';
     for(var i = 0; i < 15; i++) {
     html += '<tr>';
     html += '<td>张三' + i + '</td>';
     if(i % 2 == 0) {
     html += '<td>男</td>';
     } else {
     html += '<td>女</td>';
     }
     html += '<td>' + (10 + i) + '</td>';
     html += '<td>程序员</td>';
     html += '</tr>';
     }
     $('.table').html(html);
     $('td').addClass('col-md-3');
     var dataDOM = $('.data')[0];
     var dataContentDOM = $('.data-content')[0];
     var dataFooterDOM = $('.data-footer')[0];  
     var height = dataDOM.offsetTop + dataDOM.offsetHeight;
     setInterval(function() {
     if(dataFooterDOM.offsetTop - dataDOM.scrollTop - height <= 0) {
     dataDOM.scrollTop -= dataContentDOM.offsetHeight;
     } else {
      dataDOM.scrollTop++;
       }
      },
      20);
      </script>
      </body>
      </html>

html固定表头,表单内容垂直循环滚动的更多相关文章

  1. JS表单内容垂直循环滚动

    参考博客:https://blog.csdn.net/yubo_725/article/details/52839493  大佬是真的厉害,保存一下,以方便后续使用 效果: 源码: <!DOCT ...

  2. c#程序为PDF文件填写表单内容

    众所周知,PDF文件一般情况下是无法修改的,如果你有一张现成的PDF表格,这时想通过编程实现从数据库或者动态生成内容去填写这张表格,就会有些问题了,首先我们要解决以下2个重要的问题: 1.如何将内容写 ...

  3. Django--post提交表单内容

    本节目标:①.提交表单内容②.通过客户端提交表单新增一篇文章③.通过Django的forms组件来完成新增一篇文章 =======提交表单内容======== 1.前端html:login.html ...

  4. 分页功能实现之通过ajax实现表单内容刷新

    拿代码来说话 我们的需求就是点击翻页功能,实现表格内容局部刷新且能够翻到对应的页面上,不明白? 那么就看看下面的图,需要达到的效果如下所示: 现在要实现的功能就是把红线框起来的表单内容 在点击翻页的时 ...

  5. HTTP上下文表单内容转为实体对象

    using ServiceStack.Web; using System; using System.Collections.Generic; using System.Linq; using Sys ...

  6. js控制select选中显示不同表单内容

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. c#使用itextsharp输出pdf(动态填充表单内容,显示中文)

    相关链接: iText的简单应用-字体 c#程序为PDF文件填写表单内容 示例代码: static void Main(string[] args) { BaseFont font = BaseFon ...

  8. 清除input表单内容

    碰到几次情况,页面刷新或者从上级页面返回表单的内容依然遗留,很影响使用. <form action="" method="" autocomplete=& ...

  9. jquery获取form表单内容以及绑定数据到form表单

    在日常开发的过程中,难免会用到form表单,我们需要获取表单的数据保存到数据库,或者拿到后台的一串json数据,要将数据绑定到form表单上,这里我写了一个基于jquery的,formHelp插件,使 ...

随机推荐

  1. ubuntu 18.04/18.10解决create-react-app:command not found问题

    npm config set prefix /usr/local sudo npm install -g create-react-app create-react-app my-app

  2. 2017ICPC南宁 M题 The Maximum Unreachable Node Set【二分图】

    题意: 找出不能相互访问的点集的集合的元素数量. 思路: 偏序集最长反链裸题. 代码: #include<iostream> #include<cstring> using n ...

  3. jinja模板语法

    模板 要了解jinja2,那么需要先理解模板的概念.模板在Python的web开发中广泛使用,它能够有效的将业务逻辑和页面逻辑分开,使代码可读性增强.并且更加容易理解和维护. 模板简单来说就是一个其中 ...

  4. 自制rpm包

    参考自:https://blog.csdn.net/u010384744/article/details/80929319 https://blog.csdn.net/samxx8/article/d ...

  5. 算法-链的操作(一)-合并两个排序的链接(no.25)

    合并两个排序的链接(no.25) 把下面连个排好序的链,从小到大排序链接. list1 : 1 -> 6 -> 8 list2 : 2-> 5 -> 9 def merge(h ...

  6. mysql 与linux ~ 内存分析与调优

    一 简介:linux内存和mysql二 分类   1 用户空间和内核空间      用户空间内存,从低到高分别是五种不同的内存段      1 只读段 包含代码和常量等      2 数据段 包含全局 ...

  7. Object的wait/notify/notifyAll&&Thread的sleep/yield/join/holdsLock

    一.wait/notify/notifyAll都是Object类的实例方法 1.wait方法:阻塞当前线程等待notify/notifyAll方法的唤醒,或等待超时后自动唤醒. wait等待其实是对象 ...

  8. 【NLP CS224N笔记】Lecture 2 - Word Vector Representations: word2vec

    I. Word meaning Meaning的定义有很多种,其中有: the idea that is represented by a word,phrase,etc. the idea that ...

  9. 【VMware vSphere】VMware vSphere简单了解

    *什么是VMware vSphere           说VMware vSphere可能刚开始都是一脸懵逼,但是看到VMware时,首先想到的是不是VMware Workstation?也就是虚拟 ...

  10. 【转】python模块分析之collections(六)

    [转]python模块分析之collections(六) collections是Python内建的一个集合模块,提供了许多有用的集合类. 系列文章 python模块分析之random(一) pyth ...