手记

css a标签追加移入动画

a标签代码

<a target="_blank" href="#" class="bottom-href">点击咨询课程</a> 

.bottom-href {
    width: 299px;
    height: 64px;
    background-color: #fde17d;
    border-radius: 32px;
    font-family: SourceHanSansSC-Bold;
    font-size: 24px;
    font-weight: normal;
    font-stretch: normal;
    line-height: 64px;
    letter-spacing: 0px;
    color: #382f13;
    overflow: hidden;
    position: relative;
    display: block;
    text-align: center;
}
.bottom-href:after {
    content: "";
    position: absolute;
    background: none repeat scroll 0 0 #ff7233;
    width: 0%;
    height: 0%;
    left: 50%;
    top: 50%;
    z-index: -1;
    border-radius: 50%;
    opacity: .5;
    transform: translateX(-50%) translateY(-50%);
    transition: all .3s ease;
}
.bottom-href:link, .bottom-href:visited {
    z-index:3;
}
.bottom-href:hover:after {
    height: 450%;
    width: 110%;
    opacity: 1;
}
1人推荐
随时随地看视频
慕课网APP