Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 使用无限滚动时捕捉滚动不工作_Html_Css_Django Templates_Infinite Scroll - Fatal编程技术网

Html 使用无限滚动时捕捉滚动不工作

Html 使用无限滚动时捕捉滚动不工作,html,css,django-templates,infinite-scroll,Html,Css,Django Templates,Infinite Scroll,试图捕捉无限滚动中的每个容器 不幸的是,我真的不知道我错过了什么-玩了相当多的div设置,没有运气 最初的想法是scroll snap type参数需要位于滚动的div中,但我尝试将其移动到div中,但未能使其工作 任何帮助都将不胜感激 来自CSS .snap-container { scroll-snap-type: y mandatory; overflow: scroll; } .child { scroll-snap-align: start; } 来自HTML <

试图捕捉无限滚动中的每个容器

不幸的是,我真的不知道我错过了什么-玩了相当多的div设置,没有运气

最初的想法是scroll snap type参数需要位于滚动的div中,但我尝试将其移动到div中,但未能使其工作

任何帮助都将不胜感激

来自CSS

.snap-container {
  scroll-snap-type: y mandatory;
  overflow: scroll;
}

.child {
  scroll-snap-align: start;
}
来自HTML

<div class="infinite-container">
  <div class="snap-container">
  {% for post in feed %}
    <div class="infinite-item">
      <div class="child">
      <div class="scrolling-wrapper">
        <div class="card">
          <div class="content-section">
              <img class="rounded-circle account-img" src="{{ post.creator.image.url }}">
              <div class="media-body">
                <a class="account-heading" href='/profile/{{ post.creator.pk }}'>{{ post.creator.user.username }}</a>
<div class="video-container">
                <video src="{{ post.highlight.highlight.url }}" type='video/mp4' controls data-id="{{ post.pk }}" width="1920" height="1080">
                  Program is incompatable with your browser, please update it.
                </video>

{订阅源%中的帖子为%1}
程序与您的浏览器不兼容,请更新。