Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [CSS]Wersja dla strony na komórkę
david8213
post
Post #1





Grupa: Zarejestrowani
Postów: 308
Pomógł: 0
Dołączył: 9.12.2009

Ostrzeżenie: (10%)
X----


Dlaczego wyświetla mi zawartość DIVa zarówno na komórce jak i na laptopie skoro jest warunek :

  1.  
  2. @media (max-width: 1023px) {
  3. #sidebar {display: none;
  4.  
  5. font-size: 13px;
  6. margin: 0 auto;
  7. background: rgba(0, 0, 0, 0.4);
  8. color: white;
  9. max-width: 380px;
  10. height: 120px;
  11. text-align: center;
  12. box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
  13. }
  14.  
  15. <div class="sidebar"> tekst </div>
  16. </body>


Ten post edytował david8213 14.06.2019, 10:57:57
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Lord
post
Post #2





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


  1. <!DOCTYPE html>
  2. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  3.  
  4. body {
  5. font-family: Arial;
  6. color: grey;
  7. }
  8.  
  9. @media (max-width: 721px) {
  10. .bar {
  11. display: none;
  12. color: red;
  13. }
  14. }
  15.  
  16. @media (min-width: 1023px) {
  17. .bar {
  18. display: block;
  19. color: blue;
  20. }
  21. }
  22.  
  23. </HEAD>
  24. <div class="bar"> tekst </div>
  25.  
  26. </BODY>
  27. </HTML>
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 15.10.2025 - 16:16