css - Why use an attribute selector to match classes? -
i have found an example of responsive email templates there such css selectors such following:
a[class="btn"] why syntax used if it's totally same as:
a.btn does have impact on mobile browsers or else?
the [] syntax attribute selector.
a[class="btn"] this select <a> tag class="btn". however, not select <a> has class="btn btn_red", example (whereas a.btn would). exactly matches attribute.
you may want read the 30 css selectors must memorize. it's invaluable up-and-coming web developer.
Comments
Post a Comment