CSS3 transition下简单的背景色平滑变换实例页面

代码:

CSS代码:
.trans {
    display: inline-block;
    padding: 1px 8px;
    -webkit-transition-property: background-color;
    -webkit-transition-duration: 0.3s;
    -webkit-transition-timing-function: ease;
}
.trans:hover {
    background-color: #486AAA;
    color: #fff;
}
                
HTML代码:
<a href="/" class="trans">经过我~~</a>
                

效果: