<div class="contents">text</div>
<div class="cp_snslink08">
<ul class="cp_link_list">
<li class="cp_link facebook"><a href="#"></a></li>
<li class="cp_link twitter"><a href="#"></a></li>
<li class="cp_link instagram"><a href="#"></a></li>
</ul>
</div>
body {
/*設置する親要素ページ全体ならbodyなど*/
position: relative;
height: 100vh;
margin: 0;
padding: 0;
}
.contents {
/*サンプルはfixedの確認のためにheight指定しています。*/
height: 2000px;
}
.cp_snslink08 {
position: fixed;
bottom: 0px;
display: flex;
justify-content: center;
width: 100%;
border-bottom: 5px solid #f06292;
}
.cp_snslink08 ul.cp_link_list {
position: absolute;
bottom: 0;
display: flex;
gap: 5px;
margin: 0;
list-style: none;
}
.cp_snslink08 .cp_link {
position: relative;
bottom: -40px;
display: flex;
justify-content: center;
width: 40px;
height: 40px;
margin: 0;
padding: 10px;
border-radius: 50%;
background: #f06292;
transition: all 100ms cubic-bezier(0.42, 0, 0.58, 1);
}
/*SNS各種ロゴ*/
.cp_snslink08 .cp_link.facebook::before,
.cp_snslink08 .cp_link.twitter::before,
.cp_snslink08 .cp_link.instagram::before {
position: absolute;
content: '';
background-size: contain;
background-repeat: no-repeat;
width: 25px;
height: 25px;
}
/*facebook*/
.cp_snslink08 .cp_link.facebook::before {
background-image: url(facebook_logo_secondary.svg);
}
/*twitter*/
.cp_snslink08 .cp_link.twitter::before {
background-image: url(x-logo.svg);
}
/*instagram*/
.cp_snslink08 .cp_link.instagram::before {
background-image: url(instagram_glyph_white.svg);
}
/* hover時の動きの設定 */
.cp_snslink08 .cp_link:hover {
bottom: -20px;
}