Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [html + css] Tło tekstu żeby było... tekstem (?!), Czy da się w ten sposób?
roobik
post
Post #1





Grupa: Zarejestrowani
Postów: 410
Pomógł: 5
Dołączył: 25.01.2005
Skąd: Wrocław

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


Witam!
Szukałem po googlach - niestety. Albo nie znalazłem, bo czegoś takiego nie ma, albo dlatego, że nie potrafię szukać (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)
(IMG:http://www.exxec.neostrada.pl/cztery_bg.JPG)
Chodzi o to, by ta czwórka była tekstem-backgroundem :] dla tekstu (nawet brzmi dziwnie (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)

Czy coś takiego jest możliwe?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
strife
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 2 605
Pomógł: 96
Dołączył: 22.10.2004
Skąd: UK

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


Cytat
Przewertowałem kilkanaście stron z "lekcjami CSS", ale tam nigdzie nie mogę znaleźć odpowiedzi...


Cytat
po prostu dodajesz do stylów "z-index: 0;" "z-index: 1;" i tak dalej, im większy index, tym wyżej jest div. Nie jestem pewien, ale chyba będziesz musiał wykorzystać position:absolute; żeby to poprawnie działało.


Tutaj masz odpowiedź na tacy podaną leniu !(IMG:http://forum.php.pl/style_emoticons/default/tongue.gif) Miałem wczoraj urodziny i mam dosyć dobry humor więc masz poniżej odpowiedź (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

  1. .a1{
  2. position: absolute;
  3. width: 200px;
  4. z-index: 50;
  5. font-weight: bold;
  6.  
  7. }
  8. .a2{
  9. position: absolute;
  10. width: 200px;
  11. z-index: 40;
  12. font-size: 10em;
  13. font-weight: bold;
  14. margin-top: -30px;
  15. color: white;
  16. background-color: red;
  17. }
  18.  
  19.  
  20. <div class="a1">tekst tekst tekst tekst tekst tekst tekst tekst
  21. tekst tekst tekst tekst tekst tekst tekst tekst tekst
  22. tekst tekst tekst tekst tekst tekst tekst tekst tekst
  23. tekst tekst tekst tekst tekst tekst tekst tekst tekst
  24. tekst tekst tekst tekst tekst</div>
  25. <div class="a2">69</div>


(IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
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: 16.10.2025 - 23:45