exam questions

Exam 70-480 All Questions

View all questions & answers for the 70-480 exam

Exam 70-480 topic 1 question 35 discussion

Actual exam question from Microsoft's 70-480
Question #: 35
Topic #: 1
[All 70-480 Questions]

You are styling a box object on a page by using CSS3.
You need to set the transparency of the object to 50%.
Which two CSS3 styles will achieve the goal? (Each correct answer presents a complete solution. Choose two.)

  • A. Option A
  • B. Option B
  • C. Option C
  • D. Option D
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️
The RGBA declaration allows you to set opacity (via the Alpha channel) as part of the color value.
Example:
div { background-color: rgba(255,0,0,0.5); }
The background color has been set to blue, and the opacity set to half.
Example 2:
background-color: rgb(0,0,255); opacity: 0.5;
The background color has been set to blue, and the opacity set to half.
Reference: A brief introduction to Opacity and RGBA
http://www.css3.info/introduction-opacity-rgba/

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
989_Puks98
4 years, 6 months ago
So, from now on you won't need to use the rgba() if you don't want or have the entire div fade away - because of the opacity: 0.x - when you only want the background color a little bit transparent *not all browsers support that. .element { /* This is green */ background: rgb(0, 255, 0); /* It's the same as this */ background: #00ff00; /* We could make it 50% transparent like this */ background: rgba(0, 255, 0, 0.5); /* Or, with an alpha hex like this */ background: #00ff0080;} https://css-tricks.com/8-digit-hex-codes/ they are both correct
upvoted 1 times
...
Vaishalic
4 years, 9 months ago
Opacity:0.5; is not applicable. because It cause full div transparent . We need to only background transparent than for that background RGBA format is right.
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...