Css :- The focus selector

    The :focus selector is used to select the element that has focus.
    The :focus selector is allowed on elements that accept keyboard events or other user inputs.
Code :-

<!DOCTYPE html> 
<html> 
 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
 <style> 
  input:focus { 
   background: black; 
   color: white; 
  } 
 </style> 
 
</head> 
 
<body> 
 
 <input type="text"> 
 <input type="text"> 
 <input type="text"> 
 <input type="text"> 
 
</body> 
 
</html>

Css :- The focus selector Css :- The focus selector Reviewed by Network security on May 23, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.