Guide
1
difference between transparent and translucent background th is the value of a parameter indicating the degree of transparency.
2
One way to do translucent background - use the attribute opacity.However, the properties apply to all without exception, items that fall into the field of action.Consequently, along with the background th image becomes transparent and pale inscription.In principle, opacity can be used successfully to create aliasing.It is used in the next bunch of tags: & lt; html & gt;& lt; head & gt;& lt; title & gt; Title & lt; / title & gt;& lt; style & gt;body {background: url (address kartinki.jpg);} Div {opacity: 0.6;background: # color setting;padding: 10px;} & Lt; / style & gt;& lt; /
head & gt; & lt; body & gt;& lt; div & gt; text & lt; / div & gt; & lt; / body & gt; & lt; / html & gt; • Opacity - the transparency. • Background: url (address kartinki.jpg) - an image that should be under background th. • Background:# option - the color of the background well. • Padding: 10px - the thickness of the field element.
3
Another option is you can set the transparency. & Lt; html & gt;& lt; head & gt;& lt; title & gt; Title tab & lt; / title & gt;& lt; style type = "text / css" & gt;BODY {background: url (bg.gif);} .semiopacity {Position: relative;width: 100%;height: 200px;} .semiopacity .transparent {Background: # background color and ;opacity: 0.5;filter: alpha (Opacity = 50);height: 100%;} .semiopacity .text {Padding: 5px;position: absolute;left: 0;top: 0;} & Lt; / style & gt; & lt; / head & gt; & lt; body & gt;& lt; div class = "semiopacity" & gt;& lt; div class = "transparent" & gt; & lt; / div & gt;& lt; div class = "text" & gt;Text & lt; / div & gt; & lt; / div & gt; & lt; / body & gt; & lt; / html & gt; • Background: url (bg.gif) - background Marketing picture. • Position: relative - relative positioning. • Opacity: 0.5 -the importance of transparency. • Filter: alpha (Opacity = 50) - the importance of transparency in IE. • Position: absolute - absolute positioning.• Left: 0;top: 0 - position of the layer.
4
To solve this problem you can use the features of the program Adobe Photoshop.To do this, draw a background with the required level of transparency and save it as a png, and then paste it into the code background: url (opacity.png). & Lt; html & gt; & lt; head & gt;& lt; title & gt; Title tab & lt; / title & gt;& lt; style type = "text / css" & gt;BODY {background: url (bg.gif);} Semiopacity {padding: 5px;background: url (opacity.png);} & Lt; / style & gt;& lt; / head & gt;& lt; body & gt;& lt; div class = "semiopacity" & gt;Text on a transparent / translucent background e & lt; / div & gt; & lt; / body & gt; & lt; / html & gt;