テキスト<a href="#" class="cp_textlink07">リンクテキスト-link text-</a>テキスト
.cp_block {
margin: 5em auto;
text-align: center;
}
.cp_textlink07 {
position: relative;
display: inline-block;
padding: 0.1em 0.3em;
text-decoration: none;
color: #9C27B0;
}
.cp_textlink07::after,
.cp_textlink07::before {
position: absolute;
content: '';
border-radius: 3px;
}
.cp_textlink07::after {
bottom: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(156,39,176 ,.4);
transition: all 0.3s ease;
}
.cp_textlink07::before {
top: -4px;
bottom: -5px;
left: -4px;
right: -5px;
width: calc(100% + 6px);
height: calc(100% + 6px);
border: 1px solid #9C27B0;
opacity: 0;
transition: all 0.3s;
}
.cp_textlink07:hover:after {
background: rgba(156,39,176 ,.2);
}
.cp_textlink07:hover:before {
top: 2px;
left: 2px;
width: calc(100% - 6px);
height: calc(100% - 6px);
opacity: 1;
}