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.)
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/
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
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
...
This section is not available anymore. Please use the main Exam Page.70-480 Exam Questions
Log in to ExamTopics
Sign in:
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.
989_Puks98
4 years, 6 months agoVaishalic
4 years, 9 months ago