Added details to this article (#27842)

More info about CSS images.
This commit is contained in:
TariqAijaz
2018-12-17 08:34:06 +05:00
committed by Randell Dawson
parent 2e806b4e15
commit 87fbfbc3ed

View File

@ -2,7 +2,7 @@
title: CSS Images
---
## CSS Images
This helps in adding an image to a website.
This helps in adding an image to a website. CSS can handle images like JPG, PNG or other raster format. There are two types images: plain images which are sometimes referenced with a url, and dynamically generated images which are generated by some element.
#### Code Sample
@ -14,7 +14,8 @@ This helps in adding an image to a website.
* **height:** This specifies a height for the image(can be percent or px or auto)</li>
#### CSS Defaults
The `img` element will be rendered by default in most browsers to be displayed as an inline-block display type unless specified otherwise.
The `img` element will be rendered by default in most browsers to be displayed as an inline-block display type unless specified otherwise.
```
img {
@ -42,3 +43,7 @@ It is advised to change any one parameter, either height or width, to get a prop
##### Datatypes
<a title="The <image> CSS data type represents a 2D image. There are two kinds of images: plain images, typically referenced using a URL, and dynamically-generated images, like those generated with <gradient> or element(). Images can be used with numerous CSS properties, such as background-image, border-image, content, list-style-image, and cursor." href="/en-US/docs/Web/CSS/image"><code>&lt;image&gt;</code></a>
<a title="The documentation about this has not yet been written; please consider contributing!" href="/en-US/docs/Web/CSS/uri"><code>&lt;uri&gt;</code></a>
#### More Info:
<!-- References for more information on CSS images -->
- [CSS Images, developer mozilla](https://developer.mozilla.org/en-US/docs/Web/CSS/image)