Skip to content

Commit

Permalink
✨sticky:bottomのデモの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
tonkotsuboy committed Feb 1, 2021
1 parent c4c85a4 commit b6bec23
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
7 changes: 5 additions & 2 deletions 3_special/2_sticky/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,19 @@ main,
z-index: 0;
}

main {
margin-top: calc(50vh + 24px);
}

.navigation {
z-index: 2;
margin-top: calc(50vh + 24px);
background-color: #393f43;
height: 80px;
display: grid;
grid-auto-flow: column;
align-items: center;
position: sticky;
top: 0;
bottom: 0;
}

.brandlogo {
Expand Down
36 changes: 18 additions & 18 deletions 3_special/2_sticky/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,6 @@
height="1080"
alt=""
/>
<nav class="navigation">
<div class="brandlogo">
<img
class="brandlogo_image"
src="./images/brand_logo.svg"
width="37"
height="28"
alt=""
/>
</div>
<ul class="header_link-list">
<li><a href="#">HOME</a></li>
<li><a href="#">PROFILE</a></li>
<li><a href="#">GALLERY</a></li>
<li><a href="#">BLOG</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
<main>
<section id="profile" class="profile">
<hgroup class="section-title">
Expand All @@ -54,6 +36,24 @@ <h3 class="jp">うにちゃんについて</h3>
<img src="./images/profile.png" alt="" />
</figure>
</section>
<nav class="navigation">
<div class="brandlogo">
<img
class="brandlogo_image"
src="./images/brand_logo.svg"
width="37"
height="28"
alt=""
/>
</div>
<ul class="header_link-list">
<li><a href="#">HOME</a></li>
<li><a href="#">PROFILE</a></li>
<li><a href="#">GALLERY</a></li>
<li><a href="#">BLOG</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</nav>
<section class="gallery">
<hgroup class="section-title">
<h2 class="en">Gallery</h2>
Expand Down

0 comments on commit b6bec23

Please sign in to comment.