下面为网页设置背景色正确的是()。
A: document.style.backgroundColor=’blue’
B: body.style.backgroundColor=’blue’
C: document.body.style.backgroundColor=’blue’
D: document.body.style.background_color=’blue’
A: document.style.backgroundColor=’blue’
B: body.style.backgroundColor=’blue’
C: document.body.style.backgroundColor=’blue’
D: document.body.style.background_color=’blue’
举一反三
- 下面为网页设置背景色正确的是()。 A: document.body.style.backgroundColor='blue' B: document.style.backgroundColor='blue' C: ody.style.backgroundColor='blue' D: document.body.style.background_color='blue'
- 将表格的背景色设为蓝色,正确的属性设置是( )。 A: bgcolor="blue" B: backgroundcolor="blue" C: bgground="blue" D: background="blue"
- 有一网页代码如下:<;html>;<;head>;<;style type="text/css">;body{background-color:black;}.bg{background-color:red;}#bg{background-color:blue;}:bg{background-color:green;}<;/style>;<;/head>;<;body class="bg">;<;/body>;<;/html>;则该网页的背景色为( )。 A: black B: red C: blue D: green
- 下列哪一项是CSS正确的语法构成?( )。 A: body:color=blue; B: {body:color:blue;} C: body{color:blue;} D: {body:color=blue;}
- 给DOM对象设置红色的背景颜色,下列写法正确的是? A: ele . style . backgroundcolor=red ; B: ele . style . backgroundColor="red"; C: ele . style . background-color="red"; D: ele . style . backgroundColor=red ;