<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<style type="text/css">

@charset "UTF-8";

@font-face {
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css?family=Noto+Serif+JP&display=swap');
body {
    font-family: 'メイリオ', 'Meiryo', sans-serif;
    font-weight: normal;
    letter-spacing: 2px;
    max-width: 100%;
    text-align: justify;
    margin:0;
    color: #0F0;
    word-break: break-all;
    background-color: #fff;
}
@media screen and (min-width:1024px) {
body,
h2,
h3,
h4,
h5,
.left,
.left a {
font-size: 15px;
    line-height: 180%;
}
}
@media screen and (max-width:750px) {
body,
h2,
h3,
h4,
h5,
.left,
.left a {
font-size: 13px;
line-height: 200%;
}
}

* {
    font-family: 'メイリオ', 'Meiryo', sans-serif;
    font-weight: normal;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: #0F0;
}
section a:hover, active {
  font-weight: bold;
}


/* コンテンツ中身　の幅 */
header,
section {
margin: auto;
padding: 1em 2em;
}
header {
    color: #fff;
    background-color: #0078d7;
}
header h1 {
    font-size: 1.1em;
}
header p {
padding: 0em 0.4em;
}
section {
    color: #0F0;
    background-color: #000;
}

section a {
    padding: 0.1em 0.5em;
}

@media screen and (min-width:1024px) {
header,
section,
h2,
h3,
h4,
h5 {
width: 70%;
margin: 0 auto;
}
}
@media screen and (max-width:750px) {
header,
section,
h2,
h3,
h4,
h5 {
width: auto;
}
}


/* 文章の背景　完全透過　ｈ４ */
h2,
h3,
h4,
h5 {
    font-weight: normal;
    letter-spacing: 2px;
    max-width: 100%;
    text-align: justify;
    word-break: break-all;
padding: 4em 2em 3em 2em;
}
h2 {
    background-color: #000;
}
h3 {
    background-color: red;
    color: #fff;
}
h4 {
    background-color: blue;
    color: #fff;
}
h5 {
    background-color: #000;
    color: #ffd900;
}


/* 下部テキスト　題名　戻るボタン  */
.left,
.left a {
    text-align: left;
width: 70%;
padding: 1em 0;
color: #000;
}
@media screen and (min-width:1024px) {
.left {
margin: 1em auto;
}
}
@media screen and (max-width:750px) {
.left {
margin: 1em 2em;
}
}






/* フェード */
.fade{
    opacity: 0;
}
.fade{
    animation: 2s slidein;
    animation-delay: 2ms;
    animation-fill-mode: forwards;
}

@keyframes slidein { 
  from {opacity: 0;
    transform: translateX(0) translateY(-30);
}
  to   {opacity: 1;
    transform: translateX(180) translateY(0);
}
}


.fade2{
    opacity: 0;
    padding: 0.1em 0.5em;
}
.fade2{
    animation: 3s slidein;
    animation-delay: 4.7s;
    animation-fill-mode: forwards;
}


/* ローディング */
.fade3 {
width: 100%;
animation: 3s slidein3; 
height: 10px;
  background: #0F0;
  transform-origin: left center;
}

@keyframes slidein3 {
  from { transform: scaleX(0); 
opacity: 0; }
  to   { transform: scaleX(1);
opacity: 1; }
}
}


/* アニメーション */
.typing {
hyphens: auto;
}
.typing p {
margin-left: 0.5em;
  overflow: hidden;
  white-space: nowrap;
}

.typing .moji {
  width: 0;
  animation:
    type steps(800, end) 3s normal both;
    animation-delay: 2.6s;
}
.typing .moji2 {
  width: 0;
  animation:
    type steps(800, end) 2s normal both;
    animation-delay: 3.1s;
    word-break: break-all;
}
.typing .moji3 {
  width: 0;
  animation:
    type steps(800, end) 3s normal both;
    animation-delay: 3.9s;
}

@keyframes type {
  to {
opacity: 1;
width: 100%
  }
}




</style>



<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>

$(function() {
var _window = $(window),
    _header = $('.st'),
    heroBottom;
_window.on('scroll',function(){     
    heroBottom = $('.back').height();
    if(_window.scrollTop() > heroBottom){
        _header.addClass('fixed');   
    }
    else{
        _header.removeClass('fixed');   
    }
});
_window.trigger('scroll');

   $('a[href^=#]').click(function() {
      var speed = 600;
      var href= $(this).attr("href");
      var target = $(href == "#" || href == "" ? 'html' : href);
      var position = target.offset().top;
      $('body,html').animate({scrollTop:position}, speed, 'swing');
      return false;
   });

});
</script>