bootstrap栅格系统示例代码分享

<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta content="width=device-width, initial-scale=1, user-scalable=no"> <title>栅格系统</title> <link href="https://www.jb51.net/lib/bootstrap/css/bootstrap.css"> <link href="https://www.jb51.net/css/main.css"> <!--[if lt IE 9]> <script src="https://www.jb51.net/lib/html5shiv/html5shiv.min.js"></script> <script src="https://www.jb51.net/lib/respond/respond.min.js"></script> <![endif]--> <style> .a{ background-color: #ccc; height: 50px; border: 1px solid #333; } </style> </head> <body> <!--1170px--> <div> <div> <div>1</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> <div>6</div> <div>7</div> <div>8</div> <div>9</div> <div>10</div> <div>11</div> <div>12</div> </div> <div> <div>9</div> <div>3</div> </div> </div> <div> <div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> <div>a</div> </div> </div> <!--嵌套,因为栅格系统默认有15px 的padding--> <div> <div> <div> <div>a</div> <div>a</div> <div>a</div> </div> <div>a</div> </div> </div> <script src="https://www.jb51.net/lib/jquery/jquery.js"></script> <script src="https://www.jb51.net/lib/bootstrap/js/bootstrap.js"></script> <script src="https://www.jb51.net/js/main.js"></script> </body> </html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wyszyf.html