jquery粘性div差距
jquery sticky div gap
在我的页面中,我有一个横幅 div,下面是一个 div,我使用 sticky-kit jquery 插件将其设为粘性。
粘性 div 应该很难贴在横幅上 div 但不知何故有 1 个像素在爬行,这意味着当您滚动文本时,您会得到一种相当令人不快的效果。
我在这里制作了 jsfiddle,非常感谢您的任何建议。我试过 jquery 的其他粘性插件,它们似乎都有同样的问题。
HTML:
<div id="header">
<h2>Main Banner</h2>
</div>
<div id="wrapper">
<div id="left">
<h2>Menu</h2>
</div>
<div id="right">
<table id="tableHeader" width="100%" class="myTable" cellspacing="0">
<tr>
<td bgcolor="#FFFFCC"><h2>Inner Banner</h2><br>aaa</td>
</tr>
</table>
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br><br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
</div>
</div>
你可以height:81px;对于 div#header
在我的页面中,我有一个横幅 div,下面是一个 div,我使用 sticky-kit jquery 插件将其设为粘性。
粘性 div 应该很难贴在横幅上 div 但不知何故有 1 个像素在爬行,这意味着当您滚动文本时,您会得到一种相当令人不快的效果。
我在这里制作了 jsfiddle,非常感谢您的任何建议。我试过 jquery 的其他粘性插件,它们似乎都有同样的问题。
HTML:
<div id="header">
<h2>Main Banner</h2>
</div>
<div id="wrapper">
<div id="left">
<h2>Menu</h2>
</div>
<div id="right">
<table id="tableHeader" width="100%" class="myTable" cellspacing="0">
<tr>
<td bgcolor="#FFFFCC"><h2>Inner Banner</h2><br>aaa</td>
</tr>
</table>
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br><br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
</div>
</div>
你可以height:81px;对于 div#header