ボタンにtransition
効果を追加しましたが、効果がありません。背景色は白です。トランジションエフェクトを追加することで、色を下から上に移動する必要がありますが、効果はありません。ここにはfiddle linkがあります。ボタンへのトランジション効果を追加していません
.hourlypricing {
background: #57c1e8;
border: .2rem solid #57c1e8;
min-width: 16.5rem;
display: inline-block;
text-align: center;
height: 6rem;
margin-left: 265px;
line-height: 5.6rem;
text-transform: uppercase;
letter-spacing: .1em;
white-space: nowrap;
font-size: 1.4rem;
padding: 0 2.5rem;
font-weight: 700;
cursor: pointer;
text-decoration: none !important;
-webkit-transition: background-color .1s ease-in-out, color .1s ease-in-out, -webkit-box-shadow .1s ease-in-out;
transition: background-color .1s ease-in-out, color .1s ease-in-out, box-shadow .1s ease-in-out;
}
button.monthlypricing {
margin-left: 50px;
background: #fff;
border: .2rem solid #57c1e8;
min-width: 16.5rem;
display: inline-block;
text-align: center;
height: 6rem;
line-height: 5.6rem;
text-transform: uppercase;
letter-spacing: .1em;
white-space: nowrap;
font-size: 1.4rem;
padding: 0 2.5rem;
font-weight: 700;
cursor: pointer;
color: #000;
text-decoration: none !important;
-webkit-transition: background-color .1s ease-in-out, color .1s ease-in-out, -webkit-box-shadow .1s ease-in-out;
transition: background-color .1s ease-in-out, color .1s ease-in-out, box-shadow .1s ease-in-out;
}
<div class="hourly">
<button class="hourlypricing">Hourly Pricing</button>
<span class="FyfR" data-reactid="5">or</span>
<button class="monthlypricing">Monthly Pricing</button>
</div>
_When_は、遷移が発生すべきか?あなたはそれを指定しなかった。 – Xufox
多分あなたはアニメーションをしたいですか? –
@Xufoxユーザーが月額料金設定のときに背景色を変更し、色を下から上に移動する必要があります – user8725518