本文概述
在Bootstrap中,孔用于在具有灰色背景色和某些填充的元素周围添加圆形边框。就像显示内容的容器一样。
.well类与<div>元素一起使用可以很好地添加。
例:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Case</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h2>Well Example</h2>
<div class="well">Hi! I am a Basic Well.</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>
引导孔尺寸
默认情况下,孔的大小为中等,但是你可以根据需要更改孔的大小。 .well-sm类用于小型井,.well-lg类用于大型井。
例:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Case</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h2>Well Size</h2>
<div class="well well-sm">This is Small Well</div>
<div class="well">This is Medium Well (By Default)</div>
<div class="well well-lg">This is Large Well</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</body>
</html>