くの字の矢印を作る際に、
transform: rotate(-135deg); の書き方をいつも忘れて、なんて書いて回転させるんだっけ?ってググってるのでメモ。
See the Pen 矢印ボタンのcss by takapen (@takapen) on CodePen.
/* 右のボタン */ .button-next { width: 32px; height: 32px; margin: auto; background: #fff; border-radius: 50%; position: absolute; top: 0; bottom: 0; right: 10px; box-shadow: 0 0 2px rgba(0,0,0,0.4); } .button-next::before { content: ""; width: 2px; height: 11px; background: #888; position: absolute; top: 14px; left: 16px; transform: rotate(-135deg); } .button-next::after { content: ""; width: 2px; height: 11px; background: #888; position: absolute; top: 7px; left: 16px; transform: rotate(-45deg); } /* 左のボタン */ .button-prev { width: 32px; height: 32px; margin: auto; background: #fff; border-radius: 50%; position: absolute; top :0; bottom:0; left: 10px; box-shadow: 0 0 2px rgba(0,0,0,0.4); } .button-prev::before { content: ""; width: 2px; height: 11px; background: #888; position: absolute; top: 14px; left: 13px; transform: rotate(-45deg); } .button-prev::after { content: ""; width: 2px; height: 11px; background: #888; position: absolute; top: 7px; left: 13px; transform: rotate(-135deg); }