<ol class="cp_clist">
<li>css</li>
<li>html</li>
<li>copy</li>
<li>easy</li>
</ol>
ol.cp_clist {
padding: 0;
counter-reset:cp_clist; /*数字をリセット*/
list-style-type: none;
}
ol.cp_clist li {
position: relative;
padding: 0 5px;
margin: 0 0 5px 0px;
min-height: 28px;
background: #FFAB91;
color: #333;
transition: all .3s ease-out;
}
ol.cp_clist li::before {
position: absolute;
top: 0;
left: -10px;
display: flex;
justify-content: center;
align-items: center;
/* カウントさせる */
counter-increment: cp_clist;
content: counter(cp_clist);
/*装飾*/
color: #fff;
background: #FF5722;
height: 28px;
width: 28px;
/*位置の調整*/
padding: 0;
margin: 0px 0 0 -30px;
}
ol.cp_clist li::after {
content: '';
position: absolute;
top: 14px;
left: -28px;
margin-top: -6px;
border: 6px solid transparent;
transition: all .3s ease-out;
}
/*hover時の設定*/
ol.cp_clist li:hover {
background: #FFCCBC;
}
ol.cp_clist li:hover::after {
left: -6px;
border-left-color: #FF5722;
}