Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使它成为 jQuery 滑块的最聪明的方法是什么?我不确切知道如何在左侧和右侧进行渐变。
这个LINK可以帮助你处理渐变。容器应该具有渐变样式,而不是元素。因此,您可以轻松地在该容器中制作滑块。
您可以这样做,使用一个div带有两个 childdiv的容器:一个用于图像,一个用于渐变。对于滑动,您可以使用 jQuery为 imagediv的属性设置动画。left
div
left
http://jsfiddle.net/SSNmT/2/
未在 Opera 上测试,但适用于 Chrome 和 Firefox。