This topic has not yet been rated - Rate this topic

Hyphen property

Matches any property value that is defined with a hyphen-separated list of words when the first word is exactly equal to the value specified in the rule. This selector is generally only used to apply rules for language variants.

[attr|=val] {sRules }

attr

Either an identifier or a string.

val

Either an identifier or a string.

sRules

One or more cascading style sheet property/value pairs.

Property selectors are enabled only in standards-compliant mode (strict !DOCTYPE).

The hyphen is used primarily as a delimiter for language codes.

Attributes are case-sensitive.

The following style rule selects any property whose value begins with "en" and is immediately followed by a hyphen:

<style>
    .test        {display: none;}
    [attr|="en"] {display: block;}
</style>

<div class="test" attr="en-us">Test for [|=] (Hyphen) succeeded.</div>
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.