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

With the techniques that we have covered in this chapter, we should now be able to locate sets of elements on the page in a variety of ways. In particular, we learned how to 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, add rudimentary 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 a matched set of elements. In the next chapter, we'll explore ways in which to add a class in response to a variety of user-initiated events.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值