Add style to images with Bootstrap

BootstrapWeb DevelopmentCSS Framework

The following classes are provided by Bootstrap to add style to images:

  •  .img-rounded − adds border-radius:6px to give the image rounded corners.
  •  .img-circle − makes the entire image round by adding border-radius:500px.
  •  .img-thumbnail − adds a bit of padding and a gray border

You can try to run the following code to add style to images

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Images</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>
   </head>
   <body>
      <p>Styling images with Bootstrap</p>
      <img src = "/bootstrap/images/download.png" class = "img-rounded">
      <img src = "/bootstrap/images/download.png" class = "img-circle">
      <img src = "/bootstrap/images/download.png" class = "img-thumbnail">
   </body>
</html>
raja
Published on 19-Jun-2018 16:03:12
Advertisements