Explanation
You can specify the background color of an element using a valid color name (e.g., “red”), a HEX value (e.g., “#ff0000”), an RGB (red, green, blue) value (e.g., “rgb(255, 0, 0)”) or an RGBA (red, green, blue, alpha) color value. Here are some examples:
HTML
<div class="demo-container">
<p>background-color: #FFFFFF;</p>
<p>background-color: rgb(255, 255, 255);</p>
<p>background-color: rgba(255, 255, 255, 1.0);</p>
<p>background-color: rgba(255, 255, 255, 0.64);</p>
</div>
CSS
.demo-container {
padding: 1.4rem;
background-image: url("bg.jpg");
background-repeat: no-repeat;
background-size: cover;
background-position: center;
padding: 2rem;
}
.demo-container p {
padding: 1rem;
margin-bottom: 1rem;
border-radius: 4px;
}
.demo-container p:nth-child(1) {
/* HEX value (white ) */
background-color: #FFFFFF;s
}
.demo-container p:nth-child(2) {
/* white RGB background color */
background-color: rgb(255, 255, 255);
}
.demo-container p:nth-child(3) {
/* white RGBA background color without transperancy */
background-color: rgba(255, 255, 255, 1.0);
}
.demo-container p:nth-child(4) {
/* white RGBA background color with 64% transperancy */
background-color: rgba(255, 255, 255, 0.64);
}
Arrow at the bottom
Arrow at the bottom with a utf-8 character
Arrow at the top of a container
Aside
Background color
Blackboard design
Breadcrumbs design
Calendar design
Checkboxes design
Checkboxes as switch buttons design
Circular image with border and shadow design
Cursor
Font Awesome pulled icons
Gallery picture frame with a price ribbon
Google pie chart
Google web fonts
Image caption
Last child and not last child element
Letter spacing
List items with a Font Awesome icon
Neon text
Neon text with a flickering effect
Notebook paper background
Radio buttons design
Radio buttons as stars
Remove the glow effect from an input field
Search bar with categories
Track (audio/video subtitles)
Web fonts
Whiteboard design