Quantcast
Channel: CSSタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 8597

疑似要素で > を入れる方法

$
0
0

 
&::after {
content: '';
height: 6px;
width: 6px;
border: 0;
border-right: 2px solid #707070;
border-top: 2px solid #707070;
transform: rotate(45deg);
position: absolute;
top: 50%;
right: 5%;
margin-top: -4px;
  }

まずは、
①contentで空の要素を作る
②heightとwigthで正方形を作る
③border-right: 2px solid #707070;とborder-top: 2px solid #707070;で
④transform: rotate(45deg)で45度回転させる
⑤position: absolute;
top: 50%;
right: 5%;
margin-top: -4px;
で位置の調整をする。


Viewing all articles
Browse latest Browse all 8597

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>