From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pl/web/css/opacity/index.html | 180 ++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 files/pl/web/css/opacity/index.html (limited to 'files/pl/web/css/opacity/index.html') diff --git a/files/pl/web/css/opacity/index.html b/files/pl/web/css/opacity/index.html new file mode 100644 index 0000000000..9b3e1504ff --- /dev/null +++ b/files/pl/web/css/opacity/index.html @@ -0,0 +1,180 @@ +--- +title: opacity +slug: Web/CSS/opacity +tags: + - CSS + - CSS Property + - Reference +translation_of: Web/CSS/opacity +--- +
{{ CSSRef() }}
+ +

Podsumowanie

+ +

Parametr opacity ustala przezroczystość elementu, czyli stopień, w jakim są widoczne elementy za określonym elementem.

+ + + +

Składnia

+ +
opacity: number | inherit ;
+
+ +

Wartości

+ +
+
0 (lub mniej)
+
Element jest w pełni przezroczysty (niewidoczny)
+
0 < liczba < 1
+
Element jest półprzezroczysty (tło może być widoczne)
+
1 (lub więcej)
+
Element jest w pełni nieprzezroczysty (jednolity)
+
+ +

Przykłady

+ +
hbox.example {
+  opacity: 0.5; /* zobacz tło poprzez hbox */
+}
+
+ +

Przykład kompatybilny z różnymi przeglądarkami

+ +
pre {                               /* make the box translucent (20% nieprzezroczystości) */
+   border: solid red;
+   opacity: 0.2;
+   filter: alpha(opacity=20);       /* IE8 i starsze */
+   zoom: 1;       /* set "zoom", "width" or "height" to trigger "hasLayout" in IE 7 and lower */
+}
+
+ +
pre {                               /* make the box translucent (50% nieprzezroczystości) */
+   border: solid red;
+   opacity: 0.5;
+   filter: alpha(opacity=50);       /* IE8 i starsze */
+   zoom: 1;       /* set "zoom", "width" or "height" to trigger "hasLayout" in IE 7 and lower */
+}
+
+ +
pre {                               /* make the box translucent (80% nieprzezroczystości) */
+   border: solid red;
+   opacity: 0.8;
+   filter: alpha(opacity=80);       /* IE8 i starsze */
+   zoom: 1;       /* set "zoom", "width" or "height" to trigger "hasLayout" in IE 7 and lower */
+}
+
+ +

Różna nieprzezroczystość z :hover

+ +
<html>
+<head>
+<style>
+img.opacity {
+   opacity: 1;
+   filter: alpha(opacity=50);
+   zoom: 1;
+ }
+
+img.opacity:hover {
+   opacity: 0.5;
+   filter: alpha(opacity=100);
+   zoom: 1;
+ }
+</style>
+</head>
+
+<body>
+<img src="//developer.mozilla.org/media/img/mdn-logo.png" alt="MDN logo" width="128" height="146" class="opacity" />
+</body>
+</html>
+
+ +

Kompatybilność z przeglądarkami

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ElementChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Podstawowe wsparcie1.0{{ CompatGeckoDesktop("1.7") }}9.09.01.2 (125)
8.0
+ filter: alpha(opacity=xx)
+ filter: "alpha(opacity=xx)"

+ (oba to synonimy)
4.0
+ filter: alpha(opacity=xx)
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
ElementAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Podstawowe wsparcie1.0{{ CompatGeckoMobile("1.7") }}9.09.03.2
8.0
+ filter: alpha(opacity=xx)
+ filter: "alpha(opacity=xx)"

+ (oba to synonimy)
4.0
+ filter: alpha(opacity=xx)
+
+ + + +

Specyfikacje

+ + -- cgit v1.2.3-54-g00ecf