正文
html代码:
<span class="shake">弹</span>昨晚看到某人的个人博客网站的回到顶部按钮悬浮效果就是这样子的,还是比较有趣的,不过人家的效果可能比我的好一些,大家不妨试一下。
html代码:
<input class="search" type="text" placeholder="搜索...">一般旁边都会有一个按钮,这里我就不做了。
这种效果也是很常用,比较多还是个人网站偏多。
css代码:
.banner{ width:234px; height:34px; border-radius:34px; position:absolute; top:400px; left:200px; }.banner a{ display:inline-block; width:30px; height:30px; line-height:30px; border-radius:50%; border:2px solid lightblue; position:absolute; left:0px;top:0px; background:lightgreen; color:#fff; text-align:center; text-decoration:none; cursor:pointer; z-index:2; }.banner a:hover + span{ -webkit-transform:rotate(360deg); opacity:1; }.banner span{ display:inline-block; width:auto; padding:0 20px; height:34px; line-height:34px; background:lightblue; border-radius:34px; text-align: center; position:absolute; color:#fff; text-indent:25px; opacity:0; -webkit-transform-origin:8% center; -webkit-transition:all 1s; }限时!!免费送Dreamweaver、js等前端教程

