sr-only Bootstrap class

BootstrapWeb DevelopmentCSS Framework

Hide an element to all devices except screen readers with the class .sr-only.

You can try to run the following code to implement the sr-only Bootstrap −


Live Demo

<!DOCTYPE html>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
      <div class = "row" style = "padding: 91px 100px 19px 50px;">
         <form class = "form-inline" role = "form">
            <div class = "form-group">
               <label class = "sr-only" for = "email">Email address</label>
               <input type = "email" class = "form-control" placeholder = "Enter email">
            <div class = "form-group">
               <label class = "sr-only" for = "pass">Password</label>
               <input type = "password" class = "form-control" placeholder = "Password">
Published on 19-Jun-2018 13:38:07