Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [java script?] Po najechaniu na link pojawia się za nim grafika (tło BG), jak to zrobić? :)
ApC
post 18.12.2007, 12:54:49
Post #1





Grupa: Zarejestrowani
Postów: 121
Pomógł: 0
Dołączył: 22.09.2007

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


Pomoże ktoś?

[java script?] Po najechaniu na link pojawia się za nim grafika (tło BG)

Chodzi mi o to, że mam link:

- Strona glowna

I jak na niego najadę to z tyłu za linkiem pojawia się jakiś obrazek:)!

Ten post edytował ApC 18.12.2007, 13:05:50
Go to the top of the page
+Quote Post
in5ane
post 18.12.2007, 13:15:39
Post #2





Grupa: Zarejestrowani
Postów: 1 335
Pomógł: 34
Dołączył: 9.11.2005
Skąd: Wrocław

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


To się robi w CSS:

  1. .styl a{
  2. display: block;
  3. background-color: red;
  4. }
  5. .styl a:hover{
  6. display: block;
  7. background-color: blue;
  8. }
  9. <p class="styl"><a href="#">Link</a></p>
  10. <p class="styl"><a href="#">Link</a></p>
  11. <p class="styl"><a href="#">Link</a></p>


--------------------
> > > Tworzenie stron < < <
Go to the top of the page
+Quote Post
glh
post 18.12.2007, 13:42:15
Post #3





Grupa: Zarejestrowani
Postów: 97
Pomógł: 20
Dołączył: 18.12.2007
Skąd: Poznań

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


a mozna tez tak:
<a href="#" id="link" style="" onmouseover="document.getElementById('link').style.backgroundImage='url(obrazek.gif)';" onmouseout="document.getElementById('link').style.backgroundImage='';" >Kliknij</a>


--------------------
Go to the top of the page
+Quote Post
ApC
post 18.12.2007, 13:44:40
Post #4





Grupa: Zarejestrowani
Postów: 121
Pomógł: 0
Dołączył: 22.09.2007

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


Cytat(glh @ 18.12.2007, 13:42:15 ) *
a mozna tez tak:
<a href="#" id="link" style="" onmouseover="document.getElementById('link').style.backgroundImage='url(obrazek.gif)';" onmouseout="document.getElementById('link').style.backgroundImage='';" >Kliknij</a>



A co do tego sposobu... Jak zrobić, aby nie było tylko na linku, a na całe <td>?
Go to the top of the page
+Quote Post
glh
post 18.12.2007, 13:53:08
Post #5





Grupa: Zarejestrowani
Postów: 97
Pomógł: 20
Dołączył: 18.12.2007
Skąd: Poznań

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


tak samo:), czyli:

<table>
<tr>
<td id="link" style="height:50px;width:50px" onmouseover="document.getElementById('link').style.backgroundImage='url(obrazek.gif)';" onmouseout="document.getElementById('link').style.backgroundImage='';"><a href="#">Kliknij</a>
</td>
</tr>
</table>


--------------------
Go to the top of the page
+Quote Post
Nattfarinn
post 18.12.2007, 13:54:39
Post #6





Grupa: Zarejestrowani
Postów: 136
Pomógł: 22
Dołączył: 19.09.2007
Skąd: Sosnowiec

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


Kod
..
<td id="komorka"  style="" id="link">
  <a href="#" onmouseover="document.getElementById('komorka').style.backgroundImage='url(obrazek.gif)';" onmouseout="document.getElementById('komorka').style.backgroundImage='';" >Kliknij</a>
</td>
..


A najlepiej eventy dać do <td.. więc:

Kod
..
<td id="komorka" style="" id="link" onmouseover="document.getElementById('komorka').style.backgroundImage='url(obrazek.gif)';" onmouseout="document.getElementById('komorka').style.backgroundImage='';">
  <a href="#">Kliknij</a>
</td>
..


Ten post edytował Nattfarinn 18.12.2007, 13:56:02


--------------------
Code should run as fast as necessary, but no faster; something important is always traded away to increase speed.
-- R. Pattis
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: 19.07.2025 - 06:58