美文网首页
html选择器的测试题答案

html选择器的测试题答案

作者: 常伟波 | 来源:发表于2018-07-06 00:38 被阅读0次

这是html选择器的测试题:  html选择器测试题--带答案_免费高速下载|百度网盘-分享无限制

1,plate      

元素选择器          语法:标签名 { }

2,bento

元素选择器         语法:标签名 { }

3,#fancy

ID选择器             语法:#id内容 { }          

4,plate apple

复合选择器(交集选择器)      语法:选择器1 选择器2         (相当于嵌套,选择  语法1 下面的 语法2)

5,#fancy pickle

属于:复合选择器(交集选择器)      语法:选择器1 选择器2   (#id内容 选择器2)

6,.small

类选择器             语法:.className { }

7,##orange.small 或 bento orange.small,plate .small

属于:复合选择器(交集选择器)      语法:选择器1选择器2   (选择器)

8,bento orange.small

群组选择器(并集选择器)           语法:选择器1,选择器2,选择器3 { }

9,plate,bento

##元素选择器  

10,*

通用选择器          语法:*{ }

11,plate *

通用选择器          语法:*{ }

12,plate:first-of-type+ .small,plate:last-of-type+ apple

兄弟选择器             语法:    1,查找后边一个兄弟元素    兄弟元素 + 兄弟元素{}

13,bento~pickle

兄弟选择器             语法:    2,查找后边所有的兄弟元素    兄弟元素 ~ 兄弟元素{}

14,plate>apple

子元素选择器     语法:父元素 > 子元素{}

15,plate:last-of-type :first-child

子元素选择器  - 选择最后一个子标签           语法:       :last-child   

16,plate:first-of-type apple,plate:nth-of-type(2) .small

###子元素选择器           语法:       :first-child    - 选择第一个子标签        :first-of-type    - 第一个类型      :nth-of-type - 指定的位置

17,plate:first-of-type .small,pickle.small

  :first-child    - 选择第一个子标签      与    ### 的连用、

18,plate:nth-of-type(3)

19,bento:nth-last-child(4)

20,apple:first-of-type

21.plate:nth-of-type(even)

22.plate:nth-of-type(3),plate:nth-of-type(5)

23,plate:nth-of-type(2) .small

24,orange:last-of-type,apple:last-of-type

25,bento:not(bento:nth-of-type(2))

26,apple:not(apple:first-of-type.small)

相关文章

  • html选择器的测试题答案

    这是html选择器的测试题: html选择器测试题--带答案_免费高速下载|百度网盘-分享无限制 1,plate ...

  • HTML5选择器

    @(HTML5)[HTML5选择器] [TOC] 二、HTML5选择器 CSS选择器回顾 ID选择器 类名选择器:...

  • CSS学习笔记(一):选择器

    选择器 1.元素选择器 元素选择器:文档(HTML、XML)的元素就是最基本的选择器,html所有元素如html ...

  • CSS选择器

    标签选择器(html中的标签名称) id选择器(html标签中绑定的id名) 类选择器(html标签中绑定的cla...

  • CSS选择器(一)

    常用的CSS选择器主要有三种: 元素选择器 类选择器 ID选择器 元素选择器 定义:以HTML标签(又叫HTML元...

  • 学习笔记-CSS-2017.2.14

    CSS 选择器 1、CSS 元素选择器 如果设置 HTML 的样式,选择器通常将是某个 HTML 元素,比如 p、...

  • 选择器

    选择器作用:选择特定的HTML页面元素 基础选择器: 1、标签选择器:用HTML标签作为选择器,按标签名称分类,为...

  • CSS入门

    选择器+样式 eg: CSS规则集 选择器:HTML 元素的名称位于规则集开始(本例是p选择器 )。HTML 元素...

  • 2020-07-08 CSS 笔记

    CSS选择器 标签选择器 类选择器 class在HTML中可多次调用 id选择器1 id在HTML中只能单次调用 ...

  • css选择器

    一、选择器的种类 元素选择器 :p{},div{}; 类选择器:.header{}HTML: CSS: ID选择器...

网友评论

      本文标题:html选择器的测试题答案

      本文链接:https://www.haomeiwen.com/subject/vnmmuftx.html