-
201214 May
Posted in CSS3 Previews, Site Updates
The CSS3 Selectors module introduces three new attribute selectors, which are grouped together under the heading “Substring Matching Attribute Selectors”.
These new selectors are as follows:
[att^=val]
– the “begins with” selector
[att$=val]
– the “ends with” selector
[att*=val]
– the “contains” selectorRead the complete updated article in our CSS3 Preview section »
You can skip to the end and leave a response.
-
Comments
-
01.
E[attribute^=value] (value begins exactly with a given string)
E[attribute|=value] (value either equal to a given string or starting with that string followed by a hyphen (-))
E[attribute$=value] (value ending exactly with a given string)
E[attribute*=value] (value containing the a given substring)
E[attribute~=value]] (value containing a given word, delimited by spaces) -
02.
One of the coolest thing for these selectors is that they’re supported even in IE7 (if you care), apart from labels’ ‘for’ attribute.
-
03.
-
04.
-
05.
-
06.
There is a way to change html attributes?
something like:input{
this[value=some text here]
}or
#element{
this[data-price=some data]
}would be nice
-
07.
-
08.
very nice but this selector for class name or contents of elements ?
thank you -
09.
Nice info. Certainly will have to look to modern browsers and ignore IE7.
-
10.
-
11.
-
01.