Python matplotlibを使って学ぶ統計処理 正規分布 新しいページはコチラ

提供: yonewiki
移動: 案内, 検索
(アニメーションマーカー)
(アニメーションマーカー)
164行: 164行:
 
&nbsp;&nbsp; if <span>(</span>scroll &gt; position - windowHeight<span>)</span>{ //スクロール位置が要素の位置を過ぎたとき
 
&nbsp;&nbsp; if <span>(</span>scroll &gt; position - windowHeight<span>)</span>{ //スクロール位置が要素の位置を過ぎたとき
  
&nbsp;&nbsp$<span>(</span>this<span>)</span>.addClass<span>(</span>'active'<span>)</span>; //クラス「active」を与える
+
&nbsp;&nbsp;$<span>(</span>this<span>)</span>.addClass<span>(</span>'active'<span>)</span>; //クラス「active」を与える
  
 
  }
 
  }
213行: 213行:
 
<script>
 
<script>
 
$(window).scroll(function (){
 
$(window).scroll(function (){
  $(".marker-animation").each(function(){
+
  $(".marker-animation").each(function(){
  var position = $(this).offset().top; //ページの一番上から要素までの距離を取得
+
  var position = $(this).offset().top; //ページの一番上から要素までの距離を取得
  var scroll = $(window).scrollTop(); //スクロールの位置を取得
+
  var scroll = $(window).scrollTop(); //スクロールの位置を取得
  var windowHeight = $(window).height(); //ウインドウの高さを取得
+
  var windowHeight = $(window).height(); //ウインドウの高さを取得
  if (scroll > position - windowHeight){ //スクロール位置が要素の位置を過ぎたとき
+
  if (scroll > position - windowHeight){ //スクロール位置が要素の位置を過ぎたとき
&nbsp$(this).addClass('active'); //クラス「active」を与える
+
  $(this).addClass('active'); //クラス「active」を与える
 
}
 
}
});
 
});
 
 
</script>
 
</script>
 
<style type= "text/css">
 
<style type= "text/css">
 
 
.marker-animation.active{
 
.marker-animation.active{
  &nbspbackground-position: -100% .5em;
+
  background-position: -100% .5em;
 
}
 
}
 +
 
.marker-animation {
 
.marker-animation {
 
   background-image: -webkit-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%);
 
   background-image: -webkit-linear-gradient(left, transparent 50%, rgb(255,250,153) 50%);

2020年4月16日 (木) 00:00時点における版



個人用ツール
名前空間

変種
操作
案内
ツールボックス