使用 Bootstrap 制作圆形图像


使用 Bootstrap 类 img-circle 为图片设置样式,使图片完全圆形。

可以尝试运行以下代码使图片圆形

示例

在线演示

<!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>
      <h1>Original Image</h1>
      <img src = "https://tutorialspoint.com/videotutorials/images/numerical_ability_home.jpg">
      <h1>Rounded Image</h1>
      <img src = "https://tutorialspoint.com/videotutorials/images/numerical_ability_home.jpg" class = "img-circle">
   </body>
</html>

更新时间:2020-06-12

877 次浏览

助力你的职业生涯

完成课程并获得认证

开始
广告
© . All rights reserved.