Ever wanted to use a default image while developing? It was always time consuming to jump into Photoshop to create a sample image with the right dimensions, save and then use it for development.
Until some freaking awesome genius created placehold.it!!
If you want a default image all you need to do is pass a custom URL to your image "src" attribute to create a default image. With the parameters defined more in detail below.
Simple Image
Default with the right dimensions
Advanced Image
http://placehold.it/1220x470/3299CC/ffffff&text=Example
- First parameter (1220x470) is the dimensions
- Second parameter (3299CC) is the hex of the background
- Third parameter (FFFFFF) is the hex of the text displayed
- Fourth parameter ($text=Event) is the actual text displayed
Example Usage
Tada!!
No comments:
Post a Comment