当前阅读教程:Bootstrap4教程 > 标题、文本和链接 | |
阅读(22555525) 收藏 赞(5685) 分享 | |
上一篇: 多种颜色卡片 | 下一篇: 图片卡片 |
我们可以在头部元素上使用 .card-title 类来设置卡片的标题 。 .card-text 类用于设置卡片正文的内容。 .card-link 类用于给链接设置颜色。 实例 <div> <div> <h4>Card title</h4> <p>Some example text. Some example text.</p> <a href="#">Card link</a> <a href="#">Another link</a> </div> </div> 完整代码 <!DOCTYPE html> <html> <head> <title>Bootstrap 实例(小白教程网 2d5.net)</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.3.1/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.15.0/umd/popper.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script> </head> <body> <div> <h2>标题、文本和链接</h2> <div> <div> <h4>Card title</h4> <p>Some example text. Some example text.</p> <a href="#">Card link</a> <a href="#">Another link</a> </div> </div> </div> </body> </html> 效果图 |
|
上一篇: 多种颜色卡片 | 下一篇: 图片卡片 |