Jump to content
  • 0

Как оставить прозрачность фону, но убрать прозрачность элементов на фоне?


hea8y
 Share

Question

Подскажите пожалуйста: я использую для div-а:

filter: alpha(opacity=50);

opacity: 0.5;

Див становиться прозрачным, но так же становятся прозрачными текст и картинки на нем ....

Как тексту и картинкам вернуть не прозрачность?

Используя прозрачную картинку png только или можно как-то еще?

Вот что я использую полностью:

<head>
<title>Полупрозрачный элемент</title>
<style type="text/css">
div.page {width:450px; height:300px; background:url(beetle.jpg) repeat; border:2px solid #555555}
div.block {width:260px; height:140px; margin-top:79px; margin-left:94px; background-color:#ffffff; border:1px solid #333333;
/* Internet Explorer */
filter:alpha(opacity=50);
/* CSS3 standard */
opacity:0.5}
div.block p {margin:47px 0 0 10px; font-weight:bold; color:#000000}
</style>
</head>
<body>
<div class="page">
<div class="block">
<p>Прозрачный фон для блока.</p>
</div>
</div>
</body>

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy