Bootstrap 4 Jumbotron

Bootstrap 4 Jumbotron

虚线是一个大的灰色盒子,用来表示一些需要特别注意的文字。任何看起来很重要的文字都可以写在跳板上,以使其显得大而引人注目。

添加跳楼机的步骤:

  • 在一个div元素内使用一个jumbotron类。
  • 在div标签内写入任何文本。
  • 关闭div元素。

语法:

<div class="jumbtron"> Contents... <div>

示例:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap Jumbotron</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
    </script>
    <script src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js">
    </script>
    <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js">
    </script>
</head>
<body style="text-align:center;">
    <div class="container">
        <div class="jumbotron">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
             
<p>A computer science portal for geeks</p>
 
        </div>
    </div>
</body>
</html>

输出:

Bootstrap 4 Jumbotron

全宽的Jumbotron: .jumbotron-fluid和.container或.container-fluid类是用来创建一个没有圆边的全宽Jumbotron。

语法:

<div class="jumbotron jumbotron-fluid">
    <div class="container"> Contents... <div>
<div>

示例:

<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap Jumbotron</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
    </script>
    <script src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js">
    </script>
    <script src=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js">
    </script>
</head>
<body style="text-align:center;">
    <div class="container">
        <div class="jumbotron">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
             
<p>A computer science portal for geeks</p>
 
        </div>
    </div>
</body>
</html>

输出:

Bootstrap 4 Jumbotron
支持的浏览器:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程