运行结果尺寸: 300 x 150
x
 
<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap 示例</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="https://www.w3schools.cn/lib/bootstrap/5.1.3/css/bootstrap.min.css" rel="stylesheet">
  <script src="https://www.w3schools.cn/lib/bootstrap/5.1.3/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="container mt-3">
  <h2>具有上下文类的链接项</h2>
  <p>将鼠标移到链接的项目上以查看悬停效果:</p>
  <div class="list-group">
    <a href="#" class="list-group-item list-group-item-action">活动项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-success">成功项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-secondary">次要项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-info">信息项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-warning">警告项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-danger">危险项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-primary">主要项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-dark">深色项目</a>
    <a href="#" class="list-group-item list-group-item-action list-group-item-light">浅色项目</a>
  </div>
</div>
</body>
</html>
×

报个问题: