<!DOCTYPE html> <html> <head> <title>菜鳥教程(runoob.com)</title> <meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8"> <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <h2>排版</h2> <p class="text-left">左對齊文本</p> <p class="text-right">右對齊文本</p> <p class="text-center">居中對齊文本</p> <p class="text-justify">對齊文本。該段落會根據屏幕的大小對超出屏幕的文字進行換行</p> <p class="text-nowrap">該段落不會根據屏幕的大小對超出屏幕的文字進行換行。</p> <p><strong>提示:</strong> 嘗試重置瀏覽器大寫查看 “text-justify” 和 “text-nowrap” 段落的效果。</p> </div> </body> </html>