基本上,當我懸停時,我希望效果如下所示:
我的網站在這裡
程式碼如下忽略!重要:
.cta-button-menu, .cta-button-menu::before { transition:all 0.3s linear !important; width: 120px !important; height: 50px !important; display: inline-flex !important; justify-content: center !important; align-items: center !important; } .cta-button-menu:hover { transform:rotateZ(-45deg) !important; background: #21B6CD !important; color: white !important; } .cta-button-menu::before { content:"Book Now" !important; background-color:transparent !important; position:absolute !important; @include main-font($white, 16px !important, $font-bold !important); } .cta-button-menu:hover::before{ transform: rotateZ(90deg) !important; background-color:#e72f54 !important; border:none !important; }
出於某種原因,我無法讓藍色按鈕與紅色按鈕重疊。想不通
交換
.cta-button-menu:hover
setbackground: #e72f54
和.cta-button-menu:hover::before
setbackground-color:#21B6CD
中的顏色。而且還要改變度數。希望這對你有用######現在預訂#####-