MCQs > IT & Programming > CSS > Consider the following code snippet:
With these style rules: Which of the following code snippets when inserted into CSS will change the A and B div’s color from red to blue?

CSS MCQs

Consider the following code snippet: <div id="sectors"> <div id="A" class="A"></div> <div id="B" class="B"></div> <div id="C" class="C"></div> <div id="D" class="D"></div> <div id="E" class="E"></div> </div> With these style rules: <style> #sectors > div { float: left; position: relative; width: 80px; height: 80px; margin: 16px; background-color:red; color: white; text-align: center; } #sectors > div::after { content: attr(id) '-Block'; } #sectors > div.changecolor { background-color: blue; } </style> Which of the following code snippets when inserted into CSS will change the A and B div’s color from red to blue?

Answer

Correct Answer: In style rule add this code “#sectors > div:not(.C):not(.D):not(.E) {background-color: blue;}”

Explanation:

Note: This Question is unanswered, help us to find answer for this one

CSS Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

CSS Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it