<a href="#" class="btn-slide"> <span class="circle"> <span class="icon-long-arrow-right "></span> </span> <span class="title">Slide to Unlock</span> <span class="title-hover">Unlocked!</span> </a>
.btn-slide { position: relative; display: inline-block; height: 50px; width: 200px; line-height: 50px; padding: 0 20px; border-radius: 50px; -moz-border-radius: 50px; -webkit-border-radius: 50px; transition: .5s; -webkit-transition: .5s; border: 2px solid #444; } .btn-slide:hover { background-color: #444; } .btn-slide:hover span.circle { left: 100%; margin-left: -45px; background-color: #36a7f3; } .btn-slide:hover span.title { left: 40px; opacity: 0; color: #fff; } .btn-slide:hover span.title-hover { opacity: 1; left: 40px; color: #fff; } .btn-slide span.circle { display: block; background-color: #555; position: absolute; float: left; margin: 5px; line-height: 42px; height: 40px; width: 40px; top: 0; left: 0; transition: .5s; -webkit-transition: .5s; border-radius: 20px; -moz-border-radius: 20px; -webkit-border-radius: 20px; } .btn-slide span.title, .btn-slide span.title-hover { position: absolute; left: 80px; transition: .5s; -webkit-transition: .5s; } .btn-slide span.title-hover { left: 80px; opacity: 0; }
※参照元:http://www.webdesigncrowd.com/sliding-icon-button/