Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Universal

Matches any element type.

* { sRules }

sRules

String that specifies one or more cascading style sheet property/value pairs.

The universal selector matches every element in the document tree. If the universal selector is not the only component of a simple selector, the "*" may be omitted. For example:

  • *.myclass and .myclass are equivalent.

  • *#myid and #myid are equivalent.

  • *:hover and :hover are equivalent.

The following style rule draws a thin orange border around every element on the page:

<style>
    * {border: 1px solid orange;}
</style>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.