给站点的链接标签加入鼠标移入特效,酷酷的,纯CSS实现,听说兼容性不是很好,很多人是用jQuery实现的,但是个人不太喜欢,所以直接用CSS吧,不兼容就不兼容咯,反正本站几乎也就自己在看了,哈哈,没多少IP的,纯属自娱自乐的,所以我的浏览器肯定是兼容的就行了,管它呢,是吧!看代码吧!
先给你想要加入特效的<a>链接添加下面的CSS属性:(例如:.title a):
title a{ transition: margin 0.2s ease-out; -webkit-transition: margin 0.2s ease-out; -moz-transition: margin 0.2s ease-out; -khtml-transition: margin 0.2s ease-out; }
再给这个<a>标签添加hover属性即可,(例如:title a:hover):
title a:hover{ margin-left:10px; /* 移动距离自己设置 */ }