T
T
Timur TT2015-10-22 19:01:50
css
Timur TT, 2015-10-22 19:01:50

Need to make the background transparent, but not the picture?

Such a situation, there are two blocks one inside the other.

<div class="blocks">
<div class="icon"><img src="путь к картинки"></div>
</div>

what is the point, the class = "blocks" has translucency, and the problem is that the picture of the class = "icon" is also translucent.
.blocks{
background: #284d88;
margin: 0;
padding: 0;
width: 980px;
height: 110px;
opacity:0.7;
filter:alpha(opacity=70);
  -moz-opacity:0.7;

How to make the image not translucent?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kolya, 2015-10-22
@timurtt

Can be made easier

.blocks {
background: rgba(#284d88, 0.7);
}

Well, or convert your color to rgb, and add an alpha channel

A
Alexander Orlov, 2015-10-22
@R21

A translucent picture in .png format can be used as a background

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question