Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
こんにちはposition:fixed、ヘッダーに使用します。その後、コンテナを使用しようとしましたが、ヘッダー内にある理由がわかりません(Stacked)。margin-top を使用してコンテナーをヘッダーから分離しようとしましたが、ヘッダーも margin-top を使用していたため機能しませんでした。
position:fixed
これが私のデモです
.header クラスに top: 0px: を追加する必要があります。
.header { position: fixed; left: 0; right: 0; height: 120px; background: #232323; z-index: 10; top: 0px; }