jquery.com 的阴影效果
我不明白 www.jquery.com 如何在二级菜单上制作悬停阴影效果(下载、文档...”。我以为这是一个简单的 jquery 插件,但我在任何地方都找不到它。
我对 jquery.com 脚本非常感兴趣。 (
我在 IE 中看到了 1px off 的一种解决方案(http://stackoverflow.com/questions/2678037/css3-text-shadow-effect-with-jquery),但我对使用提到的脚本不太感兴趣:(
i cant figure out how www.jquery.com made their hover shadow effect on the secondary menu (Download, Documentation...". I thought it was a simple jquery plugin, but i cant find it anywhere.
I've found this: http://www.hintzmann.dk/testcenter/js/jquery/textshadow/, which is very straight forward, but (ofcourse) theres a problem with internet explorer. When the distance is set to 1px IE shows 2px... which makes it useless in my case
Im very interested in the jquery.com script..
(I've seen one solution for the 1px off in IE (http://stackoverflow.com/questions/2678037/css3-text-shadow-effect-with-jquery), but im not very interested in using the mentioned script :(
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这只是CSS。文本重复一次,一次为白色,一次为黑色。黑色位于下方并偏移 0.1em
It's just CSS. The text is repeated, once in white and once in black. The black is underneath and offset by .1em
他们使用 $.fn.textDropShadow,这是一个非常简单的函数,可以在悬停时添加新元素:
http://static.jquery.com/files/rocker/scripts/custom.js
They are using $.fn.textDropShadow, which is a very simple function that adds a new element on hover:
http://static.jquery.com/files/rocker/scripts/custom.js
他们的 CSS 定义如下:
他们在这里为文本赋予悬停属性:
Their CSS is defined as this:
and they give the text the hover attribute here: