@charset "UTF-8"; /* CSS Document */ //ブレイクポイントを指定------ここから $xl: 1399px; $lg: 1199px; $md: 991px; $sm: 767px; $xs: 575px; @mixin xl { @media screen and (max-width: ($xl)) { @content; } } @mixin lg { @media screen and (max-width: ($lg)) { @content; } } @mixin md { @media screen and (max-width: ($md)) { @content; } } @mixin sm { @media screen and (max-width: ($sm)) { @content; } } @mixin xs { @media screen and (max-width: ($xs)) { @content; } } //ブレイクポイントを指定------ここまで //全体のカラー設定(一括)----ここから $main-color: #000; $sub-color: #0090d5; //全体のカラー設定(一括)----ここまで //ボタン------------------------------------------------------------------ここから a.link{ font-size: 1.6rem; font-size: 16px; font-weight:bold; position: relative; display: inline-block; padding: 1rem 4rem; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-transition: all 0.3s; text-align: center; vertical-align: middle; text-decoration: none; letter-spacing: 0.1em; } //ベース ul.demo1 li:nth-child(1) a.link-flat { overflow: hidden; padding: 1rem 6rem; color: #fff; background: #000; position: relative; &::after{ content: ''; font-family: "Font Awesome 5 Free"; content: "\f054"; font-weight: 900; padding-right : 5px; color: #fff; position: absolute; right: 10px; -webkit-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } span { position: relative; } &:hover { background: $sub-color; } &:hover::after { right: 0; } } //左から右へ背景が変わるホバーボタン:水平 ul.demo2 li:nth-child(1) a.link-flat { overflow: hidden; padding: 1rem 6rem; color: #fff; background: #000; position: relative; &::after{ content: ''; font-family: "Font Awesome 5 Free"; content: "\f054"; font-weight: 900; padding-right : 5px; color: #fff; position: absolute; right: 10px; -webkit-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } span { position: relative; } &::before{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; content: ''; -webkit-transition: all .3s ease-in-out; transition: all .3s ease-in-out; -webkit-transform: translateX(-100%); transform: translateX(-100%); background: $sub-color; } &:hover::before { -webkit-transform: translateX(0%); transform: translateX(0%); } &:hover::after { right: 0; } } //左から右へ背景が変わるホバーボタン:斜め ul.demo2 li:nth-child(2) a.link-flat { overflow: hidden; padding: 1rem 6rem; color: #fff; background: #000; position: relative; &::after{ content: ''; font-family: "Font Awesome 5 Free"; content: "\f054"; font-weight: 900; padding-right : 5px; color: #fff; position: absolute; right: 10px; -webkit-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } span { position: relative; } &::before{ position: absolute; top: 0; left: 0; width: 500%; height: 500%; content: ''; -webkit-transition: all .5s ease-in-out; transition: all .5s ease-in-out; -webkit-transform: translateX(-65%) translateY(-70%) rotate(145deg); transform: translateX(-65%) translateY(-70%) rotate(145deg); background: $sub-color; } &:hover::before { -webkit-transform: translateX(-43%) translateY(-25%) rotate(135deg); transform: translateX(-43%) translateY(-25%) rotate(135deg); } &:hover::after { right: 0; } } //左から右へ背景が変わるホバーボタン:円形 ul.demo2 li:nth-child(3) a.link-flat { overflow: hidden; padding: 1rem 6rem; color: #fff; background: #000; position: relative; &::after{ content: ''; font-family: "Font Awesome 5 Free"; content: "\f054"; font-weight: 900; padding-right : 5px; color: #fff; position: absolute; right: 10px; -webkit-transition: all .3s ease-in-out; transition: all .3s ease-in-out; } span { position: relative; } &::before{ position: absolute; top: 0; left: 0; width: 100px; height: 100px; content: ''; -webkit-transition: all .5s ease-in-out; transition: all .5s ease-in-out; -webkit-transform: translateX(-100%) translateY(-25px); transform: translateX(-100%) translateY(-25px); background: $sub-color; border-radius: 50%; } &:hover::before { width: 400px; height: 400px; -webkit-transform: translateX(-1%) translateY(-175px); transform: translateX(-1%) translateY(-175px); } &:hover::after { right: 0; } } //グラデーションボタン ul.demo2 li:nth-child(4) a.link-flat { position:relative; z-index:0; overflow: hidden; padding: 1rem 6rem; color: #fff; background: #000; position: relative; &::before{ content:""; width:100%; height:100%; position:absolute; z-index:-1; left:0; top: 0; transition:0.5s; background: linear-gradient(45deg, rgba(0,144,213,1) 0%, rgba(0,0,0,1) 100%); } &::after{ content:""; width:100%; height:100%; position:absolute; z-index:-2; left:0; top: 0; background: linear-gradient(45deg, rgba(0,0,0,1) 0%, rgba(0,144,213,1) 100%); } &:hover::before{ opacity:0; } } .block-h80{ height: 80px; display: flex; align-items: center; justify-content: center; } //トップへ戻るボタン:丸ボタン ul.demo3 li:nth-child(1) .square-up{ font-size: 2.5rem; background: #fff; color: #000; padding: 10px; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border: solid 2px #000; transition: 0.3s; div{ display: block; margin-top: 10px; width: 20px; height: 16px; border-top: 2px solid #000; border-left: 2px solid #000; transform: rotate(45deg); } &:hover{ box-shadow: 0 2px 10px -6px rgba(0,0,0,.5), 0 3px 10px -4px rgba(0,0,0,.2); background: #000; color: #fff; div{ border-top: 2px solid #fff; border-left: 2px solid #fff; } } } //トップへ戻るボタン:丸ボタン ul.demo3 li:nth-child(2) .circle-up{ font-size: 2.5rem; background: #fff; color: #000; padding: 10px; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border: solid 2px #000; border-radius: 50%; transition: 0.3s; &:hover{ box-shadow: 0 2px 10px -6px rgba(0,0,0,.5), 0 3px 10px -4px rgba(0,0,0,.2); background: #000; color: #fff; } } //トップへ戻るボタン:矢印 ul.demo3 li:nth-child(3) .arrow-up{ display: flex; justify-content: center; padding-left: 3rem; height: 50px; width: 65px; text-decoration: none; font-weight: bold; transform: rotate(90deg); font-size: 90%; line-height: 2rem; color: #737373; transition: 0.3s; &::before { content: ""; display: block; position: absolute; top: -1px; left: 0px; width: 15px; border-top: solid 1px; transform: rotate(35deg); transform-origin: left top; transition: 0.3s; } &::after { content: ""; display: block; position: absolute; height: 50px; width: 65px; top: -1px; right: 1px; border-top: solid 1px; transition: 0.3s; } &:hover::before{ transform: rotate(35deg) translateX(-6px) translateY(5px); } &:hover::after{ transform: translateX(-8px); } } //トップへ戻るボタン:矢印 ul.demo3 li:nth-child(4) .simple-up{ width: 40px; background: none; color: #000; border-top: 3px solid #000; display: block; &::before { display:none; } &::after { content:"↑"; display:block; text-align:center; padding-top:0.5rem; font-size:30px; transition: 0.3s; } &:hover::after{ transform: translateY(-8px); } } //トップへ戻るボタン:文字ボタン ul.demo3 li:nth-child(5) .font-up{ font-size: 1.6rem; background: #000; color: #fff; padding: 0.5rem 1rem; display: flex; justify-content: center; align-items: center; border: solid 2px #000; transition: 0.3s; &:hover{ box-shadow: 0 2px 10px -6px rgba(0,0,0,.5), 0 3px 10px -4px rgba(0,0,0,.2); background: #fff; color: #000; } } //調整用------------------------------------------------------------------ここから article ul.demo3{ margin-top: 10rem; }