`
444878909
  • 浏览: 639182 次
文章分类
社区版块
存档分类
最新评论

(3)选择元素——(15)总结(Summary)

 
阅读更多
With the techniques that we have covered in this chapter, we should now be able tolocate sets of elements on the page in a variety of ways. In particular, we learned howto style top-level and sub-level items in a nested list by using basic CSS selectors,apply different styles to different types of links by using attribute selectors, addrudimentary striping to a table by using either the custom jQuery selectors :oddand:evenor the advanced CSS selector :nth-child(), and highlight text within certain table cells by chainingjQuery methods.

拥有了本章我们讲过的知识后,我们现在可以通过很多方法定位网页上的一串元素。特别的,我们学会了使用基础的css选择器在嵌套的结构中去定位顶部和子级的元素,学会了使用属性选择器为不同类型的链接加上不同的样式,使用定制选择器:odd和:even或者高级选择器:nth-child()给一个表加上交替的条纹,使用链状jquery方法为特定的表格块高亮文本。

So far, we have been using the $(document).ready()method to add a class to amatched set of elements. In the next chapter, we'll explore ways in which to add aclass in response to a variety of user-initiated events.

到目前为止,我们已经使用了$(document).ready()方法为一些匹配的元素集合添加方法。在下一章节,我们将学习如何相应用户的起始事件来添加一个类。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics