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.
我正在设计一个 HTML/CSS 模板。我有一个带有 CSS3 渐变和相对位置的标题。我想 。当访问者开始向下滚动时。标题属性更改为另一个属性。我可以用 jQuery 做到这一点吗?并提前感谢:)
http://api.jquery.com/scroll/
$(your-selector).scroll(function() { $(your-object-to-change-css).addClass('new_class'); $(your-object-to-change-css).removeClass('old_class'); });