菜单切换
FACESOHO知行者
心灵
记录
远方
赞赏工具
源代码:
点击运行
保存
<!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 mt-3"> <h2>Flex</h2> <p>根据不同的屏幕设备创建弹性盒子容器, d-*-flex 类可以控制弹性元素的布局。</p> <p>重置浏览器查看效果。</p> <div class="d-flex bg-success">d-flex</div> <span class="d-sm-flex bg-success">d-sm-flex</span> <span class="d-md-flex bg-success">d-md-flex</span> <span class="d-lg-flex bg-success">d-lg-flex</span> <span class="d-xl-flex bg-success">d-xl-flex</span> </div> </body> </html>
运行结果