<button class="cp_button15">button</button>
.cp_button15 {
display: flex;
justify-content: center;
align-items: center;
width: 160px;
padding: 1em;
cursor: pointer;
text-decoration: none;
color: #ec407a;
background: transparent;
border: 3px solid #ec407a;
border-radius: 8px;
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
transition: all 0.2s;
transform: translateZ(0);
transform-origin: 0 100%;
}
.cp_button15:hover {
color: #ec407a;
border: 3px solid #ec407a;
animation: button15 1s ease-in-out;
}
.cp_button15:active {
border-radius: 5% / 50%;
color: #ec407a;
background: rgba(236,64,122,0.2);
border: 3px solid #ec407a;
transform: translate(1px, 1px);
}
.cp_button15:focus:hover,
.cp_button15:focus {
color: #ec407a;
border: 3px solid #ec407a;
}
@keyframes button15 {
16.65% { transform: skew(-12deg);}
33.3% { transform: skew(10deg);}
49.95% { transform: skew(-6deg);}
66.6% { transform: skew(4deg);}
83.25% { transform: skew(-2deg);}
100% { transform: skew(0);}
}
CSS3などで新たに追加された要素・装飾方法など、日々コードを書いていないと忘れてしまったり、ささっとプロトタイプを作る時などちょっとしたことに時間をかけている暇はない。そんな時に「あ〜、あれストックしときゃよかったなぁ」って困った自分用のストックブログです。カスタマイズなどがしやすいよう、昨今のweb制作に取り入れられる一般的なコードを中心に掲載しています。
@CopypetJp More Info