mozilla

Compare Revisions

:visited

Change Revisions

Revision 292406:

Revision 292406 by teoli on

Revision 292410:

Revision 292410 by teoli on

Title:
:visited
:visited
Slug:
CSS/:visited
CSS/:visited
Tags:
NeedsRewrite, css, CSS Reference, NeedsBrowserCompatibility
NeedsRewrite, css, CSS Reference, CSS Référence, NeedsMobileBrowserCompatibility
Content:

Revision 292406
Revision 292410
n14      The <code>:visited</code> <a href="/en/CSS/Pseudo-classes" n14      The <code>:visited</code> CSS <a href="/en/CSS/Pseudo-class
>title="Pseudo-classes">pseudo-class</a> lets you select only link>es" title="Pseudo-classes">pseudo-class</a> lets you select only 
>s that have been visited. This style may be overridden by any oth>links that have been visited. This style may be overridden by any
>er link-related pseudo-classes, that is {{ cssxref(":link") }}, {> other link-related pseudo-classes, that is {{ cssxref(":link") }
>{ cssxref(":hover") }}, and {{ cssxref(":active") }}, appearing i>}, {{ cssxref(":hover") }}, and {{ cssxref(":active") }}, appeari
>n subsequent rules. In order to style appropriately links, you ne>ng in subsequent rules. In order to style appropriately links, yo
>ed to put the <code>:visited</code> rule after the <code>:link</c>u need to put the <code>:visited</code> rule after the <code>:lin
>ode> rule but before the other ones, defined in the <em>LVHA-orde>k</code> rule but before the other ones, defined in the <em>LVHA-
>r</em>: <code>:link</code> — <code>:visited</code> — <code>:hover>order</em>: <code>:link</code> — <code>:visited</code> — <code>:h
></code> — <code>:active</code>.>over</code> — <code>:active</code>.
n16    <div class="geckoVersionNote">n16    <div class="note style-wrap">
n18        {{ gecko_callout_heading("2.0") }}n18        <strong>Note:</strong> For privacy reasons, browsers stri
 >ctly limit the styles you can apply using an element selected by 
 >this pseudo-class: only {{ cssxref("color") }}, {{ cssxref("backg
 >round-color") }}, {{ cssxref("border-color") }}, {{ cssxref("bord
 >er-bottom-color") }}, {{ cssxref("border-left-color") }}, {{ cssx
 >ref("border-right-color") }}, {{ cssxref("border-top-color") }}, 
 >{{ cssxref("outline-color") }}, {{ cssxref("column-rule-color") }
 >}, <code>fill</code> and <code>stroke</code>. Note also that the 
 >alpha component will be ignored (the alpha component of the not-v
 >isited rule is used instead (except when the opacity is <code>0</
 >code>, in that case the whole color is ignored, and the one of th
 >e not-visited rule is used).
n21        Starting in Firefox 4, major limitations to the styles yon21        Though the color can be changed, the method <code>getComp
>u can apply using this selector have been introduced. For more in>utedStyle</code> will lie and always give back the value of the n
>formation on the limitations and the motivation for them, see {{ >on-visited color.
>Cssxref("Privacy and the :visited selector") }}. The same limitat 
>ions have been adopted by other browsers, including Safari 5/4.1  
>and Chrome 6. 
22      </p>
23      <p>
24        For more information on the limitations and the motivatio
 >n for them, see {{ Cssxref("Privacy and the :visited selector") }
 >}.
n24    <h2 class="editable" id="Examples">n27    <h2>
n27    <pre>n30    <pre class="brush: css">
n57            &nbsp;n60            No change.
n68            &nbsp;n71            Lift the restriction to only apply it for {{ HTMLElem
 >ent("a") }} element. Let users restricts its behavior for privacy
 > reasons.
72          </td>
73        </tr>
74        <tr>
75          <td>
76            {{ SpecName('CSS1', '#anchor-pseudo-classes', ':visit
 >ed') }}
77          </td>
78          <td>
79            {{ Spec2('CSS1') }}
80          </td>
81          <td>
82            Initial definition.
nn90    <p>
91      {{ CompatibilityTable() }}
92    </p>
93    <div id="compat-desktop">
94      <table class="compat-table">
95        <tbody>
96          <tr>
97            <th>
98              Feature
99            </th>
100            <th>
101              Chrome
102            </th>
103            <th>
104              Firefox (Gecko)
105            </th>
106            <th>
107              Internet Explorer
108            </th>
109            <th>
110              Opera
111            </th>
112            <th>
113              Safari (WebKit)
114            </th>
115          </tr>
116          <tr>
117            <td>
118              Basic support
119            </td>
120            <td>
121              1.0
122            </td>
123            <td>
124              {{ CompatGeckoDesktop("1.0") }}
125            </td>
126            <td>
127              3.5
128            </td>
129            <td>
130              3.5
131            </td>
132            <td>
133              1.0
134            </td>
135          </tr>
136          <tr>
137            <td>
138              Restrictions in CSS properties allowed in a stateme
 >nt using <code>:visited</code>
139            </td>
140            <td>
141              6
142            </td>
143            <td>
144              {{CompatGeckoDesktop("2.0") }}
145            </td>
146            <td>
147              8 (or earlier)
148            </td>
149            <td>
150              {{ CompatUnknown() }}
151            </td>
152            <td>
153              5.0
154            </td>
155          </tr>
156        </tbody>
157      </table>
158    </div>
76    <table class="standard-table">159    <table class="compat-table">
t80            Browsert163            Feature
81          </th>
82          <th>164          </th>
83            Lowest Version
84          </th>165          <th>
166            Android
85        </tr>167          </th>
168          <th>
169            Firefox Mobile (Gecko)
170          </th>
171          <th>
172            IE Phone
173          </th>
174          <th>
175            Opera Mobile
176          </th>
177          <th>
178            Safari Mobile
179          </th>
86        <tr>180        </tr>
87          <td>181        <tr>
88            Internet Explorer
89          </td>182          <td>
183            Basic support
90          <td>184          </td>
91            <strong>3.5</strong>
92          </td>185          <td>
93        </tr>186            {{ CompatUnknown() }}
94        <tr>
95          <td>187          </td>
96            Firefox
97          </td>188          <td>
189            {{ CompatGeckoMobile("1.0") }}
98          <td>190          </td>
99            <strong>1.0</strong>
100          </td>191          <td>
101        </tr>192            {{ CompatUnknown() }}
102        <tr>
103          <td>193          </td>
104            Opera
105          </td>194          <td>
195            {{ CompatUnknown() }}
106          <td>196          </td>
107            <strong>3.5</strong>
108          </td>197          <td>
109        </tr>198            {{ CompatUnknown()
110        <tr>
111          <td>
112            Safari
113          </td>
114          <td>
115            <strong>1.0</strong>

Back to History