Attribute substring selectors

Total Post:28

Points:196
 1280  View(s)
Ratings:
Rate this:
Hi,

What is Attribute Substring selectors in css and how to use this? Any idea! I'm waiting your response.

Thanks in advance. 

  1. Post:604

    Points:4228
    Re: Attribute substring selectors

    Matches the specified substring of an attribute value

    Note  Attribute selectors are not supported in webpages that are displayed in the Microsoft Internet Explorer 5 document mode (also known as "Quirks" mode). To use attribute selectors, add a !DOCTYPE directive that specifies a standard-based document. For more information, see Defining Document Compatibility. 

    <!DOCTYPE html>
    <html>
      <head>
        <style type="text/css">
          .test        { display:none; }
          [attr*="ai"] { display:block; }
        </style>
      </head>
      <body>
        <div class="test" attr="Contains">Test for [*=] (Substring) succeeded.</div>
      </body>
    </html>

      Modified On Mar-30-2018 03:58:12 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!