CSS Background Shorthand
CSS background – Shorthand property
To shorten the code, it is also possible to specify all the background properties in one single property. This is called a shorthand property.
Instead of writing:
body {
background-color: #ffffff;
background-image: url("img_tree.png");
background-repeat: no-repeat;
background-position: right top;
}
You can use the shorthand property background
:
Example
Use the shorthand property to set the background properties in one declaration:
body {
background: #ffffff url("img_tree.png") no-repeat right top;
}
When using the shorthand property the order of the property values is:
background-color
background-image
background-repeat
background-attachment
background-position
It does not matter if one of the property values is missing, as long as the other ones are in this order. Note that we do not use the background-attachment property in the examples above, as it does not have a value.
38 Responses
order levofloxacin 500mg online levofloxacin 500mg uk
order avodart for sale dutasteride for sale online zofran 4mg pills
order spironolactone 25mg online purchase fluconazole sale order fluconazole online
brand ampicillin 500mg order ampicillin 250mg pills order erythromycin 250mg sale
buy sildenafil online cheap purchase methocarbamol generic buy methocarbamol pill
sildenafil drug estradiol 2mg canada oral estrace 1mg
lamictal 50mg without prescription order generic retin cream tretinoin gel drug
order tadalis without prescription voltaren 50mg usa purchase diclofenac online cheap
purchase isotretinoin online order accutane 10mg order azithromycin 500mg for sale
purchase indocin without prescription trimox drug trimox price
cialis Order viagra online viagra pills 50mg
order anastrozole 1 mg generic cost of viagra per pill viagra 50mg us
tadalafil 20mg pas cher acheter 10mg gГ©nГ©rique cialis en france sildenafil 100mg generique pas cher
deltasone 5mg price buy prednisone 5mg for sale sildenafil 50mg ca
cialis 10mg kaufen cialis 5mg fГјr frauen sildenafil kaufen generika
buy accutane 40mg azithromycin 250mg oral stromectol generic name
order modafinil online cheap Buy branded cialis buy acetazolamide without prescription
order altace 10mg sale purchase clobetasol pill astelin 10ml uk
order clonidine generic spiriva 9 mcg tablet purchase tiotropium bromide generic
hytrin 5mg uk order leflunomide 10mg sale sulfasalazine 500mg cost
alendronate 35mg pills order pepcid 40mg without prescription famotidine for sale
benicar 20mg over the counter benicar 10mg brand buy acetazolamide for sale
buy isosorbide generic order micardis 20mg pill brand telmisartan 80mg
molnunat 200 mg for sale buy cefdinir for sale buy lansoprazole pills
order sertraline sale Buy real viagra online without prescription viagra 100mg uk
oral salbutamol 100 mcg imuran 100 mcg price oral sildenafil
cialis prices Cialis overnight cheap sildenafil without prescription
buy cialis online cheap buy pyridium online buy amantadine 100mg without prescription
order naltrexone 50mg order femara generic abilify 20mg sale
dapsone 100mg uk avlosulfon canada aceon 8mg for sale
order medroxyprogesterone 5mg pills cyproheptadine ca purchase cyproheptadine for sale
purchase fluvoxamine for sale cymbalta ca order glucotrol online cheap
buy isotretinoin 40mg without prescription amoxil 250mg brand order prednisone without prescription
purchase piracetam online viagra overnight delivery viagra 100mg oral
order azithromycin 500mg online cheap neurontin 600mg us order gabapentin 100mg without prescription
order cialis pill viagra next day viagra 50mg canada
oral lasix 40mg order hydroxychloroquine online hydroxychloroquine 200mg ca
cialis super active cialis 10mg cheap order anafranil 25mg generic