案例:Bootstrap案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
    <title>W3xue教程(w3xue.com)</title> 
5
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="utf-8">
6
    <link rel="stylesheet" href="/css/bootstrap/bootstrap3.3.7.min.css">  
7
    <script src="/js/bootstrap/jquery.min.js"></script>
8
    <script src="/js/bootstrap/bootstrap3.3.7.min.js"></script>
9
</head>
10
<body>
11
    
12
<div class="container">
13
    <h2>排版</h2>
14
    <p class="text-left">左对齐文本</p>
15
    <p class="text-right">右对齐文本</p>      
16
    <p class="text-center">居中对齐文本</p>
17
    <p class="text-justify">对齐文本。该段落会根据屏幕的大小对超出屏幕的文字进行换行</p>      
18
    <p class="text-nowrap">该段落不会根据屏幕的大小对超出屏幕的文字进行换行。</p>
19
    <p><strong>提示:</strong> 尝试重置浏览器大写查看 “text-justify” 和 “text-nowrap” 段落的效果。</p>      
20
</div>
21
22
</body>
23
</html>

 运行结果 
 北美留学生论坛