From 2d7f9d35746559054a3071899036d81f4c215ef5 Mon Sep 17 00:00:00 2001 From: Joana Barradas Date: Fri, 16 Aug 2019 05:48:26 +0200 Subject: [PATCH] =?UTF-8?q?Add=20text=20and=20code:=20"N=C3=A3o=20existe?= =?UTF-8?q?=20uma=20propriedade=20(#27941)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../transparent-background-images/index.md | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/guide/portuguese/css/tutorials/transparent-background-images/index.md b/guide/portuguese/css/tutorials/transparent-background-images/index.md index 33c2bba4ef..991448cc88 100644 --- a/guide/portuguese/css/tutorials/transparent-background-images/index.md +++ b/guide/portuguese/css/tutorials/transparent-background-images/index.md @@ -8,4 +8,28 @@ Este é um esboço. [Ajude nossa comunidade a expandi-lo](https://github.com/fre [Este guia de estilo rápido ajudará a garantir que sua solicitação de recebimento seja aceita](https://github.com/freecodecamp/guides/blob/master/README.md) . -#### Mais Informações: \ No newline at end of file +Não existe uma propriedade background-opacity no CSS, no entanto é possivel fazê-lo inserindo um pseudo elemento com uma opacidade regular no tamanho exato do elemento por trás dele. + +```CSS +div { + width: 200px; + height: 200px; + display: block; + position: relative; +} + +div::after { + content: ""; + background: url(image.jpg); + opacity: 0.5; + top: 0; + left: 0; + bottom: 0; + right: 0; + position: absolute; + z-index: -1; +} +``` + +#### Mais Informações: +* [CSS-Tricks](https://css-tricks.com/snippets/css/transparent-background-images/)