Jump to content
alexer13

Proprietate php

Recommended Posts

Vreau sa pun unele imagini pe site cu un efect pe care nu-l mai gasesc..

este vorba cel cu gray [imaginea este "alb-negru" iar img:hover sa aiva din nou culoare ]

Am gasit pe net insa cu CSS3 iar pe mine ma intereseaza un CSS2 sa nu am probleme cu IE.

// scuze de titlu am probleme cu chrome care vrea sa completeze el tot..

Link to comment
Share on other sites

aviz amatorilor :) cand schimbi poza de fundal prin css ( hover , active , focus , etc... ) daca nu faci preload la imagine o sa ai flicker pe site :) eu personal ( si multi altii , ie: google ) folosesc poze suprapuse:

iei poza care vrei sa o pui normal , si in acelasi fisier ( jpg,png,gif,etc... ) pui mai jos poza 2 si cand vrei sa schimbi pur si simplu muti poza de background cu background-position.

Singura problema cu metoda asta e ca nu o poti folosi la background-uri cu repeat si x si y ( daca ai doar pe una din axe repeat merge )

Cand vrei sa schimbi o poza cu repeat pe ambele axe... ori lasi flicker ori faci preload

cel mai usor mod de a face preload:

<style>

#a{ background: url(x.png) }

#a:hover{ background: url(y.png) }

div#preload { background: url(y.png); width: 1px; height:1px; } // puteti sa si ascundeti backround-ul sa nu cumva sa apara un pixel aiurea cu

background-repeat: no-repeat;

background-position: -10000px - 10000px;

( tot la #preload )

</style>

<div id="preload"></div>

<div id="a">

</div>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...