- A proper graphics editor link GIMP.
- A proper web browser like Mozilla Firefox.
- A proper text editor like gedit.
Graphics Steps
- Open up GIMP.
- Create a new image. When you do this you are offered size etc, but there is also an advanced section which you need to open. Choose to have a transparent background.
- Add a new layer to your image.
- Now, on the new layer add a shape. First choose the colour you want your shape to be. Then choose the shape. Create the shape on your image.
- In the layer window you should now be able to change the opacity of your layer. Move it down to about 50%.
- Save you image as a png.
The HTML Steps
- Create a simple HTML page.
- Create a div and give it an id.
- Create a reference in your HTML Head to a style sheet.
The CSS Steps
- Create a .css file with the same name as you referred to in your HTML page.
- In your css file create an entry for the body of your page and add a coloured background. Just so that you can see the semi-transparency.
- Now create a reference to the div you created in your HTML page.
- In the reference for your div add a reference to the background image you created in your image editor.
Review
Now save everything and preview it in your web browser.
For a further test add some text your your div.
Done.
No comments:
Post a Comment