JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<button class="test">
<a href="#">test テスト</a>
</button>
<a href="#" class="link_btn">aタグのみ test テスト</a>
<div class="test2">
<a href="#"></a>
</div>
CSS
.test {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
border: 0;
background-color: #63bfbc;
color: #fff;
border-radius: 3px;
font-size: 16px;
transition: .3s ease;
}
.test:hover {
color: #c00;
background-color: #BDE4E3;
}
.test a {
color: inherit;
text-decoration: none;
}
.test a::after {
content: "\f08e";
font-family: "fontAwesome";
margin-left: 5px;
}
/*以下はaタグのみの場合*/
.link_btn {
display: inline-block;
background-color: #63bfbc;
color: #fff;
border-radius: 3px;
font-size: 16px;
transition: .3s ease;
padding: 0 10px;
text-decoration: none;
}
.link_btn:hover {
color: #c00;
background-color: #BDE4E3;
}
.link_btn::after {
content: "\f08e";
font-family: "fontAwesome";
margin-left: 5px;
}
/*test2*/
.test2 {
position: relative;
width: 100px;
height: 1.5em;
display: inline-block;
border: 1px solid #111;
border-radius: 3px;
box-shadow: 0 0 5px rgba(0, 0, 0, .8) inset;
overflow: hidden;
background-image: url("https://wp-simplicity.com/wp-content/uploads/2014/08/8628912404_6b859de7b7_k_thumb.jpg");
background-position: center center;
background-size: cover;
background-repeat: no-repeat;
}
.test2::before {
content: "button";
font-size: 16px;
position: absolute;
top: 50%;
left: -200%;
transform: translate(-50%, -50%);
color: #fff;
text-shadow: 0 0 5px rgba(0, 0, 0, .9);
transition: .3s ease;
z-index: 2;
}
.test2::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: .3s ease;
background-color: rgba(0, 0, 0, .8);
}
.test2:hover::before {
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
}
.test2:hover::after {
opacity: 1;
}
.test2 a {
position: absolute;
width: 100%;
height: 100%;
}