Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [CSS][HTML]Przezroczystość, Kwadrat staje się przezroczysty, a ma być nieprzezroczysty.
Flaim
post 6.07.2020, 01:03:53
Post #1





Grupa: Zarejestrowani
Postów: 1
Pomógł: 0
Dołączył: 6.07.2020

Ostrzeżenie: (0%)
-----


Witam. Mam mały problem z przezroczystością. Zrobiłem pojemnik który ma być przezroczysty, natomiast kwadrat w nim zawarty już nie. Niestety nie wiem jak to zrobić.

HTML
Kod
<!DOCTYPE html>
<html lang="pl" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Testy</title>

  <link rel="stylesheet" href="style.css" type="text/css">

  </head>
  <body>
    <div class="conteiner">
      <div class="box">
        <div class="menu1"></div>
      </div>
    </div>
  </body>
</html>

CSS
Kod
body{
  background-image: url(img/tło.png);
}

.conteiner{
  width: 100%;
  height: 100%
}

.box{
  width: 810px;
  height: 500px;
  background-color: black;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.menu1{
  background-color: #ffffff;
  width: 220px;
  height: 220px;
  margin: 30px;
}
Go to the top of the page
+Quote Post
trueblue
post 6.07.2020, 06:22:45
Post #2





Grupa: Zarejestrowani
Postów: 6 761
Pomógł: 1822
Dołączył: 11.03.2014

Ostrzeżenie: (0%)
-----


https://www.w3schools.com/cssref/func_rgba.asp


--------------------
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 24.04.2024 - 22:38