Home >Web Front-end >Bootstrap Tutorial >How to implement rounded borders in bootstrap

How to implement rounded borders in bootstrap

(*-*)浩
(*-*)浩Original
2019-07-18 16:23:207431browse

Bootstrap supports images.

.img-thumbnail: Add some padding and a gray border.

How to implement rounded borders in bootstrap

If other elements require rounded borders, this can be achieved by setting .border-radius and .border. (Recommended learning: Bootstrap video tutorial)

Example:

<!DOCTYPE html>
<html>
<head>
  <title>Bootstrap 实例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <h2>缩略图</h2>
  <p>.img-thumbnail 类用于设置图片缩略图(图片有边框):</p>            
  <img src="https://static.runoob.com/images/mix/cinqueterre.jpg" class="img-thumbnail" alt="Cinque Terre">
</div>

</body>
</html>

For more Bootstrap related technical articles, please visit Learn in the Bootstrap Tutorial column!

The above is the detailed content of How to implement rounded borders in bootstrap. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn