Boost C++ 程式庫

...世界上最受推崇且設計精良的 C++ 程式庫專案之一。 Herb SutterAndrei Alexandrescu,《C++ 程式設計規範

網站範例

這既是一個測試頁面,也是 Boost 網頁中可用各種樣式元素的指南。此外,作為自我參考,這是一個位於 [class="section"] div 內的 [class="section-body"] div。每個 [class="section"] div 應具有相應的「id」,在本例中,該區段為 [id="intro"]。您可以隨意從這裡複製元素到其他頁面,以快速獲得所需的結構。更重要的是,如果您添加新的內容樣式,請更新此頁面,因為它有助於所有人了解網站文件。

區段 [class="section-title"]

區段主體 [class="section-body"] 內的簡單段落。

標題 2

SourceForge.net左邊的圖片使用 [class="left-inset"] 作為任何對齊於頂部和左側邊緣的浮動插入元素的簡寫。— Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus. Pellentesque id arcu non sem placerat iaculis. Curabitur posuere, pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.

標題 3

SourceForge.net此圖片使用 [class="right-inset"] 作為上一節的鏡像,用於對齊於頂部和右側邊緣的浮動插入元素。— Sed et lectus in massa imperdiet tincidunt. Praesent neque tortor, sollicitudin non, euismod a, adipiscing a, est. Mauris diam metus, varius nec, faucibus at, faucibus sollicitudin, lectus. Nam posuere felis ac urna. Vestibulum tempor vestibulum urna. Nullam metus. Vivamus ac purus. Nullam interdum ullamcorper libero. Morbi vehicula imperdiet justo. Etiam mollis fringilla ante. Donec et dui. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Etiam mi libero, luctus nec, blandit ac, rutrum ac, lectus.

標題 4

這些希望是所有標準的文字標記樣式。請注意,這些不是結構性標記元素。也就是說,這些是人們看到的用於標記段落中文本部分的樣式,例如本段第二句中的「不是」。

EM
表示強調
STRONG
表示更強的強調
CITE
包含引用或參考其他來源。
DFN
表示這是所含術語的定義實例
CODE
指定電腦程式碼的片段。
SAMP
指定來自程式、指令碼等的範例輸出
鍵盤 (KBD)
表示使用者要輸入的文字
變數 (VAR)
表示變數或程式引數的實例。
縮寫 (ABBR)
表示縮寫形式(例如 WWWHTTPURIMass. 等)。
首字母縮略詞 (ACRONYM)
表示首字母縮略詞(例如WAC, 雷達等)。
引號 (Q)
表示引文,可能包含子引號
下標和上標 (SUB and SUP)
表示下或上
插入和刪除 (INS and DEL)
用於標記文件中相對於其他版本已插入刪除的部分。
標題 5

HTML 有各種結構元素。這表示它們通常不會以文字流顯示,而是以個別區塊元素顯示。這段文字就是一個例子。另一個例子是稍微被過度使用的 BLOCKQUOTE。

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Duis ligula lorem, consequat eget, tristique nec, auctor quis, purus. Vivamus ut sem. Fusce aliquam nunc vitae purus. Aenean viverra malesuada libero. Fusce ac quam. Donec neque. Nunc venenatis enim nec quam. Cras faucibus, justo vel accumsan aliquam, tellus dui fringilla quam, in condimentum augue lorem non tellus. Pellentesque id arcu non sem placerat iaculis. Curabitur posuere, pede vitae lacinia accumsan, enim nibh elementum orci, ut volutpat eros sapien nec sapien. Suspendisse neque arcu, ultrices commodo, pellentesque sit amet, ultricies ut, ipsum. Mauris et eros eget erat dapibus mollis. Mauris laoreet posuere odio. Nam ipsum ligula, ullamcorper eu, fringilla at, lacinia ut, augue. Nullam nunc.

Boost 頁面避免使用表格作為排版機制。這在許多方面都有好處和壞處。最重要的優點是內容更具語義化。這表示大多數瀏覽器會將表格解釋為它們的本質:表格內容。以下便捷的範例來自於實用的 HTML4 W3 標準

Microsoft Windows 中的字碼頁支援
字碼頁 ID 名稱 ACP OEMCP Windows NT 3.1 Windows NT 3.51 Windows 95
1200 Unicode (ISO/IEC-10646 的 BMP) X X *
1250 Windows 3.1 東歐語系 X X X X
1251 Windows 3.1 西里爾語系 X X X X
1252 Windows 3.1 美國 (ANSI) X X X X
1253 Windows 3.1 希臘語系 X X X X
1254 Windows 3.1 土耳其語系 X X X X
1255 希伯來語 X X
1256 阿拉伯語 X X
1257 波羅的海語系 X X
1361 韓語 (Johab) X ** X
437 MS-DOS 美國 X X X X
708 阿拉伯語 (ASMO 708) X X
709 阿拉伯語 (ASMO 449+, BCON V4) X X
710 阿拉伯語 (透明阿拉伯語) X X
720 阿拉伯語 (透明 ASMO) X X
標題 6

HTML 最重要的元素之一是超連結。在 Boost 頁面中,所有 連結 都盡可能以相似且一致的方式處理,不論其上下文為何。樣式變化是為了考慮上下文中的顏色對比差異。例如,頁首和頁尾中的連結使用不同的顏色來盡可能地匹配文字顏色並與各自的背景形成對比。在區段內容中,就像這裡一樣,連結也會根據它們是導向 Boost 網站 還是某些 外部網站 [class="external"] 而提供不同的外觀和風格。由於大多數時候連結都是內部連結,因此這是預設的語義。外部連結需要使用 [class="external"] 進行修飾。

  • 這是一個「目錄式」無序列表 [ul class="directory"]。它的樣式設計旨在以盡可能緊湊的形式顯示簡短項目的列表。目前,這意味著項目排列成兩列,並且項目以從左到右、從上到下的方式排列。

  • 即使這是一個無序列表,也可以用這種方式排列任何區塊元素。最外層的容器需要是 [class="directory"],而內部的項目則需要是 [class="directory-item"]。

無序列表 [ul]

這種類型的列表是最常用的結構元素之一。它用於目錄列表、歷史記錄列表、目錄表等等。目標是通過在列表 [ul] 上使用 [class="type-here"] 屬性,按類型對各種列表進行分類。請克制僅因為某個分類具有您想要的特定外觀而使用它的衝動。因為在未來的某個時候,外觀會發生變化,而您將無法控制在特定上下文中的效果。

預設 [ul]

  • 項目 1
    • 子項目 1a
      • 子項目 1a1
      • 子項目 1a2
    • 子項目 1b
  • 項目 2
    • 子項目 2a
    • 子項目 2b

目錄 [ul class="directory"]

  • 項目 1
    • 子項目 1a
      • 子項目 1a1
      • 子項目 1a2
    • 子項目 1b
  • 項目 2
    • 子項目 2a
    • 子項目 2b

目錄表 [ul class="toc"]

歷史記錄 [ul class="history"]

  • 項目 1
    • 子項目 1a
    • 子項目 1b
  • 項目 2
    • 子項目 2a
    • 子項目 2b

選單 [ul class="menu"]

樹狀結構 [ul class="tree"]

  • 項目 1
    • 子項目 1a
      • 子項目 1a1
      • 子項目 1a2
    • 子項目 1b
  • 項目 2
    • 子項目 2a
    • 子項目 2b

預先格式化 [pre]

這通常用於顯示程式碼範例,或更準確地說是固定格式的範例。例如 Boost 軟體授權

Boost Software License - Version 1.0 - August 17th, 2003

Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:

The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.