positioin: fixed; 簡単にするとこれや!
特定の位置に固定すること!
どんな時に使うか
スクロールしても変わらないので、headerとかに使いましょー
こんな書き方もできます
/* header */
.一番上のクラス{
position: fixed;
width: 100%;
background: transparent;
padding: 15px 0px;
transition: all 0.5s;
z-index: 99999;
}
.fixed {
position: fixed;
top:0;
left:0;
width: 100%;
background-color: #00967f;
padding: 0px;
}