Ajax Loader
×

Demonstrating Attribute Selector of CSS3

I have used a very simple example to demonstrate how Attribute selector can be used in CSS3. I have created 6 Article with same class, of which every alternate Article has ID. Now talking about CSS, i have defined some basic dimensions for an element in one css class i.e: dimenBasic. As every article in the demo has same class applied, i am using a special selector in CSS3 to identify few divs and change their properties. This selector is called Attribute selector. Its defined in Square brackets([]). In these square brackets we need to specify attribute name operator and attribute value. For whichever element the condition is true, it apply the properties to that specific element. E.g: Second article has id changeColor. Now i have written a class to identify an element with class basicDimen and id changeColor, when this condition is satisfied, properties under that class are applied to the element.

×

Coding Preferences


HTML

CSS

Javascript

More

×

Your Default Settings - Preferences

×
×
×

Validations

(Errors from your JS or Pre-Processors code)

    HTML
    CSS
    JavaScript

    Demonstrating Attribute Selector of CSS3

    CSSDeck G+