Jump to content
Sign in to follow this  
gaby

Pseudoclase de stiluri CSS

Recommended Posts

mainow0.gif

Pseudoclasele se utilizeaza pentru personalizarea legaturilor web, atat de tip text, cat si de tip imagine. Ele se definesc in interiorul unui bloc <style>...</style> sau intr-un fisier extern.

Exemplu:

a: link {color: blue; font-size: 15pt;}
a: hover {color: red; font-style: italic; text-decoration: none}
a: visited {color: magenta; font-size: 15pt; text-decoration: none}
a: active {color: cyan; font-size: 15pt; text-decoration: none}[/code] [color=green][b]Explicatii:[/b][/color]
a: link se refera la modul in care arata un link in mod normal; a: hover se refera la modul in care arata un link atunci cand se trece cu mouse-ul peste el (in Netscape functioneaza doar de la versiunea 6); a: active se refera la modul in care arata un link atunci cand se efectueaza click pe el; a: visited se refera la modul in care arata un link deja vizitat; specificatia "text-decoration: none" elimina sublinierea implicita cu o linie albastra a link-ului.
Pentru ca numai anumite legaturi sa utilizeze un stil, se pot folosi urmatoarele trei metode:
[code]a: link.CLASA1 {color: red; font-style: italic; text-decoration: none} combinat cu <a class="CLASA1" href="link_aici">Text Link</a>

a: link#ID1 {color: magenta; font-size: 15pt; text-decoration: none} combinat cu <a id="ID1" href="link_aici">Text Link</a>

a.CLASA1: link {color: cyan; font-size: 15pt; text-decoration: none} combinat cu <a class="CLASA1" href="link_aici">Text Link</a>

Share this post


Link to post
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.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...