更多“● 以下CSS 选择符定义中, (61) 属于类选择符。(61)A. P {color:red; font-size:12pt }B. p.blue{color:blue}C. #Red{color:red;}D. P EM { background: yellow }”相关问题
  • 第1题:

    以下关于样式表项的定义中,错误的是:()。

    A.H1, H2 {color:red}

    B.H1 B{color:red}

    C.H1#color_red{color:red}

    DA:Active {color:red}


    参考答案:C

  • 第2题:

    publicclassBall{publicenumColor{RED,GREEN,BLUE};publicvoidfoo(){//insertcodehere{System.out.println(c);}}}Whichcodeinsertedatline14causesthefoomethodtoprintRED,GREEN,andBLUE?()

    A.for(Colorc:Color.values())

    B.for(Colorc=RED;c<=BLUE;c++)

    C.for(Colorc;c.hasNext();c.next())

    D.for(Colorc=Color[0];c<=Color[2];c++)

    E.for(Colorc=Color.RED;c<=Color.BLUE;c++)


    参考答案:A

  • 第3题:

    以下选项中不能正确把c1定义成结构体变量的是

    A.typedef struct { int red; int green;; int blue; }COLOR; COLOR cl;

    B.struct color cl { int red; int green; int blue; };

    C.struet color { int red; int green; int blue; }c1;

    D.struct { int red; int green; int blue; }cl;


    正确答案:B
    解析:结构体类型的定义格式为:
      stract结构体名
      成员说明列表};
      结构体变量的定义有3种形式:第一种,定义结构体类型的同时定义结构体变量,如: street结构体名{成员说明列表}变量;第二种,先定义一个结构体类型,然后使用该类型来定义结构体变量,如:strect student{成员说明列表};student变量;第三种,定义一个无名称的结构体类型的同时定义结构体变量,如:strect student{成员说明列表}变量;。

  • 第4题:

    以下选项中能正确把c1定义成结构体变量的是( )。

    A.typedef struct { int red; int red; int green; int blue; }COLOR; COLOR c1;

    B.struct color c1 { int red int red; int green int blue; };

    C.stmctcolor { int red, int green; int blue; }c1;

    D.struct { int red; int green; int blue; }c1;


    正确答案:D
    解析:因为结构体中不能出现同名的成员变量,所以选项A和B都是错误的;又因为结构体中成员的定义应该由分号隔开,所以选项C也是错误的。选项D定义了一个无名结构体,并同时定义该结构体变量c1,是正确的写法。故应该选择D。

  • 第5题:

    下列哪个CSS语法是正确的?()

    • A、body.color=red
    • B、{body.color=red}
    • C、{body:color=red}
    • D、body{color:red}

    正确答案:D

  • 第6题:

    关于行内样式语法格式正确的是()。

    • A、〈p style="color:red,font-size:14px;"〉行内样式〈/p〉
    • B、〈p style="color=red;font-size:14px;"〉行内样式〈/p〉
    • C、〈p style="color:red;font-size:14px;"〉行内样式〈/p〉
    • D、以上都不正确

    正确答案:C

  • 第7题:

    设置鼠标移动到链接上时候文字变成红色如何设置?()

    • A、a:link{color:red;}
    • B、a:active{color:red;}
    • C、a:visited{color:red;}
    • D、a:hover{color:red;}

    正确答案:D

  • 第8题:

    以下选项中哪个是给p标签添加颜色的jQuery语法()。

    • A、$("p").css("color","red")
    • B、p.css("color","red")
    • C、p.style.color="red"
    • D、p.style="red"

    正确答案:A

  • 第9题:

    在HTML中,下面()是已被访问过呈红色文字的样式。

    • A、a:link{color:red;}
    • B、a:hover{color:red;}
    • C、a:visited{color:red;}
    • D、a:active{color:red;}

    正确答案:C

  • 第10题:

    下列选项中,可用于定义背景颜色的是()。

    • A、background-color:red;
    • B、background-color:#f00;
    • C、background-color:rgb(255,0,0);
    • D、color:#

    正确答案:A,B,C

  • 第11题:

    单选题
    下列代码使用HTML元素的ID属性,将样式应用于网页上的某个段落:<P id=”firstp”>这是一个段落</P>,下面选项中,()正确定义了上面代码引用的样式规则。
    A

    <Style Type=”text/css”> P {color:red} </Style>

    B

    <Style Type=”text/css”> #firstp {color:red} </Style>

    C

    <Style Type=”text/css”> .firstp {color:red} </Style>

    D

    <Style Type=”text/css”> P.firstp {color:red} </Style>


    正确答案: A
    解析: 暂无解析

  • 第12题:

    单选题
    在HTML中,下面()是已被访问过呈红色文字的样式。
    A

    a:link{color:red;}

    B

    a:hover{color:red;}

    C

    a:visited{color:red;}

    D

    a:active{color:red;}


    正确答案: A
    解析: 暂无解析

  • 第13题:

    以下选项中不能正确把c1定义成结构体变量的是

    A.typedef struct {int red: int green: int blue; } COLOR; COLOR c1;

    B.struct color c1 {int red int green: int blue; };

    C.struct color {int red , int green : int blue : )cl;

    D.struct {int red; int green; int blue } c1 ;


    正确答案:B
    解析:本题考核的知识点是结构体类型定义。结构体类型的定义格式为:strcut结构体名{成虽说明列表};结构体变量的定义有3种形式:第一种,定义结构体型的同时定义结构体变量,如:strcut结构体名{成员说明列表}变量;选项C属于这种情况,故选项C正确:第二种,先定义一个结构体类型,然后使用该类型来定义结构体变量,如:strcutstudent{成员说明列表}:student变量;选项A属于这种情况,故选项A正确;第三种,定义一个无名称的结构体类型的同时定义结构体变量,如:strcutstudent{成员说明列表}变量;选项D属于这种情况,故选项D正确.所以,4个选项中选项B符合题意。

  • 第14题:

    以下选项中不能正确把cl定义成结构体变量的是

    A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

    B.struct color cl { int red; int green; int blue; }

    C.struct color { int red; int green; int blue; } cl;

    D.struct { int red; int green; int blue; } cl;


    正确答案:B
    解析:选项A)是把结构体类型改名后定义为变量cl。选项C),D)则是在定义结构体类型时定义变量,而选项B)不符合结构体类型定义的语法规则。

  • 第15题:

    下列选项中不能正确定义结构体的是_______。

    A.typedef struct

    B.struct color cl {int red; {int red; int green; int green; int blue; int blue; }COLOR; }; COLOR cl;

    C.struct color

    D.struct {int red; {int red; int green; int green; int blue; int blue; }cl; }cl;


    正确答案:B
    解析:将一个变量定义为标准类型与定义为结构体类型不同之处在于:后者不仅要求指定变量为结构体类型,而且要求指定为某一特定的结构体类型(例如,struct color),不能只指定结构体名。其中可以不出现结构体名,答案D就是缺省结构体名的隋况。而变量名歹婊必须放在成员列表后面,所以B答案不能正确将cl定义为结构件变量。

  • 第16题:

    以下CSS选择符定义中,______属于类选择符。

    A.P{color:red; font-size:12pt}
    B.p.blue{color:blue}
    C.#Red{color:red;)
    D.PEM {background: yellow}

    答案:B
    解析:
    本题考查CSS的基础知识。CSS(Cascading Style Sheets,层叠样式表,简称为样式表)是用于(增强)控制网页样式并允许将样式信息与网页内容分离的一种标记性语言。在CSS基本语法结构中,样式表的结构为:选择符{属性1:值1;属性2:值2;…}其中,选择符有如下几种形式:(1)HTML标记。任何HTML标记都可以是一个CSS的选择符,如P{color:red;font-size:12pt}。(2)类选择符。一个选择符能有不同的CLASS(类),因而允许同一元素有不同的样式。格式如下:标记名:类名{属性1:值1;属性2:值2;…}(3)ID选择符。ID选择符个别地定义每个元素的成分。这种选择符应该尽量少用,因为它具有一定的局限。一个ID选择符的指定要有指示符“#”在名字前面。(4)关联选择符。关联选择符是用空格隔开的两个或更多的单一选择符组成的字符串。这些选择符可以指定一般属性,而且因为层叠顺序的规则,它们的优先权比单一的选择符大。

  • 第17题:

    在HTML中,使用HTML元素的class属性,将样式应用于网页上某个段落的代码如下所示:< P class=“firstp”>这是一个段落< /P> 下面选项中,()正确定义了上面代码引用的样式规则。

    • A、<style type="text/css">P{color:red}</style> 
    • B、<style type="text/css">#firstp {color:red} </style> 
    • C、<style type="text/css"> .firstp{color:red} </style> 
    • D、<style type="text/css">P.firstp{color:red}</style>

    正确答案:C

  • 第18题:

    以下关于标签选择器语法格式正确的是()。

    • A、{color:red;}
    • B、h1{color:red;}
    • C、h7{color:red;}
    • D、p{color:red;}

    正确答案:B,D

  • 第19题:

    下列代码使用HTML元素的ID属性,将样式应用于网页上的某个段落:<P id=”firstp”>这是一个段落</P>,下面选项中,()正确定义了上面代码引用的样式规则。

    • A、<Style Type=”text/css”> P {color:red} </Style>
    • B、<Style Type=”text/css”> #firstp {color:red} </Style>
    • C、<Style Type=”text/css”> .firstp {color:red} </Style>
    • D、<Style Type=”text/css”> P.firstp {color:red} </Style>

    正确答案:B

  • 第20题:

    js的以下操作中可以给div添加样式的是()。

    • A、div.style.color="red"
    • B、div.style="red"
    • C、div.color="red"
    • D、div.style.color("red")

    正确答案:A

  • 第21题:

    下列代码段是某页面的样式设置:< STYLE TYPE=”text/css”>.blue{color:blue}.red{color:red}< /STYLE>现要求将页面中的第一个H1标题设置为红色,第一个段落设置为蓝色.下列代码正确的是()

    • A、<H1 id=red>第一个标题</H1><P id=blue>第一个段落</p> 
    • B、<H1 color:red>第一个标题</H1><P color:blue>第一个段落</p> 
    • C、<H1 class=red>第一个标题</H1><P class=blue>第一个段落</p> 
    • D、<H2 class=red>第一个标题</H2><H1>第一个标题<H1><P id=blue>第一个段落</p>

    正确答案:C

  • 第22题:

    public class Ball {  public enum Color { RED, GREEN, BLUE };  public void foo() {  // insert code here  { System.out.println(c); }  }  }  Which code inserted at line 14 causes the foo method to print RED, GREEN, and BLUE?() 

    • A、 for( Color c : Color.values())
    • B、 for( Color c = RED; c <= BLUE; c++)
    • C、 for( Color c; c.hasNext() ; c.next())
    • D、 for( Color c = Color[0]; c <= Color[2]; c++)
    • E、 for( Color c = Color.RED; c <= Color.BLUE; c++)

    正确答案:A

  • 第23题:

    单选题
    以下选项中哪个是给p标签添加颜色的jQuery语法()。
    A

    $(p).css(color,red)

    B

    p.css(color,red)

    C

    p.style.color=red

    D

    p.style=red


    正确答案: A
    解析: 暂无解析