CSS Backgrounds
The CSS background properties are used to add background effects for elements.
In these chapters, you will learn about the following CSS background properties:
background-color
background-image
background-repeat
background-attachment
background-position
background
(shorthand property)
CSS background-color
The background-color
property specifies the background color of an element.
Example
The background color of a page is set like this:
body {
background-color: lightblue;
}
With CSS, a color is most often specified by:
- a valid color name – like “red”
- a HEX value – like “#ff0000”
- an RGB value – like “rgb(255,0,0)”
Other Elements
You can set the background color for any HTML elements:
Example
Here, the <h1>, <p>, and <div> elements will have different background colors:
h1 {
background-color: green;
}
div {
background-color: lightblue;
}
p {
background-color: yellow;
}
Opacity / Transparency
The opacity
property specifies the opacity/transparency of an element. It can take a value from 0.0 – 1.0. The lower value, the more transparent:
opacity 1
opacity 0.6
opacity 0.3
opacity 0.1
Example
div {
background-color: green;
opacity: 0.3;
}
Note: When using the opacity
property to add transparency to the background of an element, all of its child elements inherit the same transparency. This can make the text inside a fully transparent element hard to read.
Transparency using RGBA
If you do not want to apply opacity to child elements, like in our example above, use RGBA color values. The following example sets the opacity for the background color and not the text:
100% opacity
60% opacity
30% opacity
10% opacity
An RGBA color value is specified with: rgba(red, green, blue, alpha). The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque).
Example
div {
background: rgba(0, 128, 0, 0.3) /* Green background with 30% opacity */
}
levaquin 500mg uk levaquin 250mg cheap
avodart canada order tamsulosin 0.4mg sale ondansetron 8mg pill
spironolactone 25mg ca buy spironolactone 25mg without prescription fluconazole brand
ampicillin 500mg price order erythromycin 250mg online cheap buy generic erythromycin 500mg
fildena 100mg brand buy bimatoprost generic robaxin 500mg brand
lamictal online lamictal price retin ca
buy tadalafil generic voltaren generic diclofenac sale
accutane online buy azithromycin 250mg brand buy zithromax 500mg without prescription
indomethacin cost purchase trimox for sale order trimox 500mg without prescription
purchase cialis sale buy cialis on line viagra 50mg price
purchase anastrozole online cheap buy clarithromycin 500mg generic sildenafil australia
vrai tadalafil 5mg prix generique tadalafil 20mg viagra 25mg sans ordonnance en pharmacie
prednisone online buy cialis 40 mg brand name viagra
tadalafil 5mg ohne rezept tadalafil 10mg bestellen sildenafil 200mg ohne rezept
isotretinoin without prescription amoxicillin 250mg canada ivermectin 3 mg for sale
doxycycline us doxycycline 100mg over the counter buy lasix 40mg
order altace 10mg without prescription brand altace 5mg order generic azelastine
buy clonidine 0.1mg online cheap buy clonidine 0.1mg pill buy spiriva 9 mcg for sale
order buspar without prescription oxybutynin over the counter buy ditropan 2.5mg without prescription
hytrin 1mg usa buy arava 20mg online azulfidine for sale online
fosamax generic buy generic ibuprofen famotidine 40mg price
olmesartan 10mg sale calan 240mg uk diamox online order
generic tacrolimus 5mg labetalol order online order urso 150mg generic
order imdur 20mg sale imdur 40mg brand order micardis 20mg pill
bupropion 150 mg ca buy strattera 10mg online buy generic quetiapine 100mg
molnupiravir 200mg cheap omnicef over the counter buy prevacid 15mg online
sertraline 50mg cheap Viagra overnight viagra pills 100mg
imuran pills sildenafil brand order generic sildenafil 50mg
cialis online buy Cialis online ordering viagra 50mg brand
buy generic cialis 20mg brand amantadine 100mg amantadine 100 mg drug
revia online buy buy albenza 400mg for sale aripiprazole 30mg us
buy dapsone 100 mg online brand fexofenadine 120mg purchase aceon generic
brand provera 5mg order cyproheptadine 4mg sale cyproheptadine 4mg price
provigil 100mg usa stromectol 3mg cost ivermectin 3 mg over the counter
buy luvox 50mg for sale cymbalta 20mg drug buy glipizide 5mg online
cheap accutane 20mg order isotretinoin 10mg online cheap prednisone drug
purchase nootropil for sale buy nootropil generic order viagra 100mg online
buy azithromycin pills brand gabapentin buy neurontin 800mg
tadalafil 40mg generic sildenafil mail order us buy sildenafil tablets
lasix ca plaquenil 200mg us order hydroxychloroquine 400mg sale
tadalafil for sale cialis 20mg price clomipramine 50mg over the counter
brand aralen buy olumiant 2mg pills baricitinib 2mg pill
https://drugsoverthecounter.shop/# over the counter diuretics
pills like viagra over the counter cvs over the counter laxatives
https://over-the-counter-drug.com/# over the counter pill identifier
best over the counter nausea medicine over the counter medicine for uti
https://over-the-counter-drug.com/# over the counter medicine for anxiety and stress
metronidazole over the counter blood pressure over the counter medication
over the counter muscle relaxer best sleeping pills over the counter
best over the counter sleep aid is ivermectin over the counter
https://over-the-counter-drug.com/# over the counter acid reflux medicine
anthem over the counter catalogue strongest antifungal over the counter
arthritis medicine for dogs over the counter ivermectin over the counter
over the counter muscle relaxers over the counter antidepressant
over the counter viagra over the counter anti nausea
https://over-the-counter-drug.com/# over the counter blood pressure medication
over the counter anti nausea medication wellcare over the counter ordering
п»їwhere to buy stromectol online stromectol pills
https://stromectol.science/# is minocycline an antibiotic
generic stromectol minocycline 100 mg capsule
how much is amoxicillin amoxicillin 500 mg tablet
https://doxycycline.science/# buy cheap doxycycline online
buy stromectol ivermectin lice
https://amoxil.science/# amoxicillin tablets in india
cheap zithromax zithromax buy online
where to buy zithromax in canada zithromax coupon or buy zithromax online fast shipping
http://hottubchemical.com/__media__/js/netsoltrademark.php?d=zithromax.science zithromax 250 mg tablet price
zithromax antibiotic zithromax canadian pharmacy and zithromax buy online no prescription zithromax cost
amoxicillin brand name buy amoxil
https://stromectol.science/# buy minocycline 50 mg for humans
doxycycline 50 mg doxycycline 100mg online
doxycycline 500mg buy cheap doxycycline or buy doxycycline 100mg
http://trailahead.net/__media__/js/netsoltrademark.php?d=doxycycline.science where to purchase doxycycline
doxycycline hydrochloride 100mg doxycycline medication and where can i get doxycycline order doxycycline online
https://stromectol.science/# buy ivermectin canada
order stromectol stromectol
https://doxycycline.science/# doxycycline
cheap amoxil amoxicillin 875 mg tablet
doxycycline 100mg tablets doxycycline mono or doxycycline mono
http://versaliftnewyork.com/__media__/js/netsoltrademark.php?d=doxycycline.science doxycycline tablets
odering doxycycline buy doxycycline cheap and buy doxycycline online 270 tabs buy doxycycline online
https://stromectol.science/# price of ivermectin tablets
buy zithromax 1000mg online zithromax prescription
ivermectin for sale ivermectin new zealand or stromectol 6 mg dosage
http://ww5.stolenbikes.com/__media__/js/netsoltrademark.php?d=stromectol.science order minocycline 100 mg online
ivermectin cream 1% ivermectin oral 0 8 and minocycline efectos secundarios ivermectin 0.1 uk
zithromax 500 mg buy zithromax online
https://stromectol.science/# topical minocycline
order amoxil amoxicillin cephalexin
ivermectin over the counter canada stromectol for sale
https://doxycycline.science/# buy cheap doxycycline online
zithromax where can i buy zithromax medicine
antibiotic amoxicillin amoxicillin 500 mg online or amoxicillin 500 tablet
http://loansafe.biz/__media__/js/netsoltrademark.php?d=amoxil.science amoxicillin canada price
amoxicillin 500 mg cost cost of amoxicillin 875 mg and buying amoxicillin in mexico buy amoxicillin canada
https://zithromax.science/# zithromax online australia
buy doxycycline cheap generic doxycycline
https://zithromax.science/# generic zithromax azithromycin
how to get zithromax over the counter can i buy zithromax over the counter in canada or zithromax 250
http://cannabusatx.com/__media__/js/netsoltrademark.php?d=zithromax.science zithromax 500 mg lowest price pharmacy online
zithromax buy online no prescription zithromax purchase online and zithromax over the counter uk zithromax generic price
doxycycline prices doxycycline 50mg or where to purchase doxycycline
http://lpgacontinentscup.com/__media__/js/netsoltrademark.php?d=doxycycline.science doxycycline 100mg online
doxy doxycycline and buy doxycycline without prescription doxycycline generic
how to order doxycycline generic for doxycycline
https://doxycycline.science/# doxycycline hyc 100mg
zithromax for sale buy zithromax online cheap
Read information now. Read here.
https://stromectolst.com/# ivermectin 4
п»їMedicament prescribing information. Medscape Drugs & Diseases.
All trends of medicament. Top 100 Searched Drugs.
where to buy ivermectin
safe and effective drugs are available. Drug information.
safe and effective drugs are available. п»їMedicament prescribing information.
generic ivermectin for humans
Definitive journal of drugs and therapeutics. Top 100 Searched Drugs.
Definitive journal of drugs and therapeutics. earch our drug database.
stromectol generic
Some are medicines that help people when doctors prescribe. Some are medicines that help people when doctors prescribe.
Get warning information here. Cautions.
stromectol 0.5 mg
Drugs information sheet. Get information now.