css3 选择器

来源:互联网 发布:c语言图形程序设计 编辑:程序博客网 时间:2024/06/03 16:28
    1.派生选择器        通过依据元素在其位置的上下文关系 li strong{};    2.id选择器        #sidelar{}    3.类选择器        .fancy td{}; 或者基于类而被选择         <td class="fancy"></td>  ->td.fancy    4.属性选择器        [title]{}为带有title属性的所有元素设置样式        [title="content"]为title="content"的所有元素设置样式        [title~=hello] 包含指定值hello的元素,        适用于由空格分隔的属性值        title="hello world"            [lang|=en] lang语言, 适用于-分隔的属性值 en-us        [attribute^=value]  匹配属性值以指定值开头的每个元素。        [attribute$=value] 匹配属性值以指定值结尾的每个元素。        [attribute*=value]  匹配属性值中包含指定值的每个元素。        注:属性选择在表单设置样式时特别有用        input[type='text']        input[type='button']
原创粉丝点击