以下代码用于我网站上的按钮我尝试将其用于另一个带有不同按钮的按钮,我试图更改类名称来自" set_3_button3"到" set_35_button35"还" set_3_button3 fav"但问题是整个设计发生了变化,并且与原来的设计看起来并不相同
.set_3_button3 {
color: rgba(255,255,255,1);
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
position: relative;
background:#ffe826;
overflow: hidden;
width: auto;
padding: 0px 25px;
margin-right: 2.5em;
line-height: 45px;
float: left;
cursor: pointer;
text-align: center;
}
.set_3_button3 a {
color: rgba(51,51,51,1);
text-decoration: none;
display: block;
}
.set_3_button3 span {
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.set_3_button3:hover {
background-color:#dd483f;
}
.set_3_button3:hover > span {
opacity: 0;
-webkit-transform: translate(0px, 40px);
transform: translate(0px, 40px);
}
.set_3_button3::after {
content: attr(data-text);
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
opacity: 0;
-webkit-transform: translate(30%, 0);
transform: translate(30%, 0);
-webkit-transition: all 0.3s;
-moz-transition: all 0.3s;
-o-transition: all 0.3s;
transition: all 0.3s;
}
.set_3_button3:hover::after {
opacity: 1;
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}

<div class="set_3_button3" data-text="Add to favorite"><span> <i class="fa fa-star fa-lg" aria-hidden="true"></i> Add to favorite </span></div>
&#13;