Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Pseudo-Classes

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 213
    Comment on it

    Pseudo Classes:

    Pseudo - Classes are dynamic and are used to style the content as a result user interaction. Pseudo- class starts with a colon(:).

    For E.g: :hover, :active, :focus.

    :hover - This class changes the color of an element when the user points the mouse over it.

               (Try code in text editor and run it on the browser)
    
    <html>
       <head>
      <style type="text/css">
         a:hover {color: #DF4718}
      </style>
         </head>
           <body>
           <a href="">Hover Example</a>
             </body>
                </html> 
    

    :active - This class changes the color of active links when user click on it.

      (Try code in text editor and run it on the browser)
    
           <html>
              <head>
                <style type="text/css">
                  a:active {color: #FF00CC}
                     </style>
                    </head>
                      <body>
                        <a href="">Active Example</a>
                         </body>
                            </html
    

    :focus - This class changes the color of the focused links.

     (Try code in text editor and run it on the browser)
    
           <html>
            <head>
            <style type="text/css">
              a:focus {color: #0000FF}
            </style>
           </head>
             <body>
             <a href="">Focus Example</a>
          </body>
              </html>  
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: