Jump to content

Opacity In Css !


gaby

Recommended Posts

Pentru a pune peste o imagine un div (tabel) transparent ca in exemplul de mai jos,

exempluec0.png

aveti nevoie de:

1. o imagine peste care doriti sa puneti div-ul (in exemplul meu cea de mai jos).

picturetl8.th.jpg

2. continutul paginii care va fi formata din cateva coduri CSS si div-ul. (exemplu mai jos)

<html>
<title>PC Troubleshooting Transparent DIV</title>
<head>
<style type="text/css">
body
{
background-image: url("poza_de_mai_sus.jpg");
background-repeat: no-repeat;
color: white;
font-size: 20px;
}
div
{
width: 200px;
height: 500px;
margin-left: 15em;
background-color: black;
opacity: 0.50;
}
p { padding-top: 20px;
}
</style>
</head>
<body>
<div><center><p>CONTINUTUL DIN INTERIORUL DIV-ULUI, IN CAZUL MEU: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed cursus. Sed sagittis. Nullam imperdiet enim nec quam. Fusce consequat, nunc lacinia interdum fermentum, tortor ante cursus quam, sit amet eleifend risus nunc suscipit risus.
http://pctroubleshooting.ro</p>
</div>
</body>
</html>[/code]

Transparenta se poate schimba dupa plac, modificati: [b]opacity: 0.50;[/b]

50% transparenta = 0.50

[color=red][b]*[/b][/color][u]Observatie:[/u] Codul de mai sus, [color=red][b]nu[/b][/color] va functiona si in [b]Internet Explorer[/b], asa ca vom adauga un filtru, si anume: filter: alpha(opacity=50);

Deci codul pentru afisarea transparentei div-ului in Internet Explorer va fi:

[code]<html>

<title>PC Troubleshooting Transparent DIV</title>

<head>

<style type="text/css">

body {

background-image: url("poza_de_mai_sus.jpg");

?

Te-ai inregistrat? Ne-ar placea sa te prezinti.

Cum pot sustine forumul?
Cumpara de la eMag folosind acest link.
--------------------
oG2BN9d.gifse1WdXd.gifQG6MtmI.gifRHYjDzD.gifG5p1wui.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.