All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.public.bower_components.iron-image.README.md Maven / Gradle / Ivy

There is a newer version: 1.9.3.1
Show newest version
iron-image
==========

`iron-image` is an element for displaying an image that provides useful sizing and
preloading options not found on the standard `` tag.

The `sizing` option allows the image to be either cropped (`cover`) or
letterboxed (`contain`) to fill a fixed user-size placed on the element.

The `preload` option prevents the browser from rendering the image until the
image is fully loaded.  In the interim, either the element's CSS `background-color`
can be be used as the placeholder, or the `placeholder` property can be
set to a URL (preferably a data-URI, for instant rendering) for an
placeholder image.

The `fade` option (only valid when `preload` is set) will cause the placeholder
image/color to be faded out once the image is rendered.

Examples:

Basically identical to `` tag:

```html

```

Will letterbox the image to fit:

```html

```

Will crop the image to fit:

```html

```

Will show light-gray background until the image loads:

```html

```

Will show a base-64 encoded placeholder image until the image loads:

```html

```

Will fade the light-gray background out once the image is loaded:

```html

```




© 2015 - 2025 Weber Informatics LLC | Privacy Policy