• Trang chính
  • Ngẫu nhiên
  • Đăng nhập
  • Tùy chọn
  • Giới thiệu Wikipedia
  • Lời phủ nhận
Wikibeta, Bách khoa tri thức mở

Bản mẫu:Columns

  • Ngôn ngữ
  • Theo dõi
  • Xem mã nguồn
{{{col1}}} {{{col2}}} {{{col3}}} {{{col4}}} {{{col5}}} {{{col6}}} {{{col7}}} {{{col8}}} {{{col9}}} {{{col10}}}
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

{{Columns}} may be used to create up to ten columns across a page.

CautionThis template creates a table rather than actual columns. This means that it displays poorly on mobile devices or narrow screens and is sub-optimal in terms of accessibility. Approximately half of the readers of English Wikipedia articles are using mobile devices and may have trouble reading the content that is wrapped in this template. Please consider using one of the CSS-based column templates (listed at the end of this page) instead, or not using columns at all.

Mục lục

  • 1 Cú pháp
  • 2 Các ví dụ
  • 3 Xem thêm
    • 3.1 Gia đình bản mẫu tạo ra cột

Cú pháp

Values for col1 and col2, i.e. the contents of the first and second columns, are expected.

{{Columns
| màu nền  =   <!-- Background (default is none) -->
| kiểu     =   <!-- Use to add extra overall CSS styling -->
| colwidth =     <!-- Width of each column (default 15.0em) -->
| gapbetween =   <!-- Gap (gutter) between each column (default 1.25em) -->
| col1width =    <!-- Use to set a custom width for col1 -->
| col1 =         <!-- (REQUIRED) First column's contents -->
| col2width =    <!-- Use to set a custom width for col2 (and so on) -->
| col2 =         <!-- (REQUIRED) Second column's contents -->
| col3width = 
| col3 = 
...
| col10width = 
| col10 = 
}}

The parameters  colstyle  and  col1style  to  col10style  may also be used to tailor all and/or individual columns' CSS styling.

Các ví dụ

Mã
{{Columns
| col1 = This is a simple application of the columns template, demonstrating the default column widths
| col2 = and gaps between columns. See the next example for a more customized use of the template.
}}
Kết quả
This is a simple application of the columns template, demonstrating the default column widths and gaps between columns. See the next example for a more customized use of the template.



Mã
{{Columns |màu nền=beige |colwidth=8.5em |gap<!--between-->=3.25em

| col1 =
* These
* columns
* are
* more
* complex

| col2 =
The<br />background<br />is<br />beige

| col3 =
; Each : column
; is   : 8.5 [[Em (typography)|''em'']]
; wide

| col4 =
{{{!}}
!colspan="2"{{!}} and
{{!-}}
{{!}} the {{!!}} gap
{{!-}}
{{!}}colspan="2"{{!}} between
{{!-}}
{{!}} each {{!!}} is
{{!-}}
!colspan="2" align="center"{{!}} 3.25 ''em''
{{!}}}
}}
Kết quả
  • These
  • columns
  • are
  • more
  • complex
The
background
is
beige
Each
column
is
8.5 em
wide
and
the gap
between
each is
3.25 em

Xem thêm

Gia đình bản mẫu tạo ra cột

CautionCác bản mẫu được liệt kê ở đây không thể thay thế cho nhau. Cho ví dụ, sử dụng {{col-float}} với {{col-end}} thay vì {{col-float-end}} sẽ để lại mở "div" (phân chia) HTML, có khả năng gây hại cho mọi định dạng tiếp theo.

<section begin="table" />

Gia đình Loại
Xử lý mã
 bảng wiki?dagger
Bản mẫu bắt đầu Phân chia cột Bản mẫu kết thúc
"Col" Bảng Có {{Col-begin}},
{{Col-begin-fixed}} hoặc
{{Col-begin-small}}
{{Col-break}} hoặc
{{Col-2}} .. {{Col-5}}
{{Col-end}}
"Col-float" CSS float Có {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns" Bảng Không {{Columns}} – –
"Columns-list" Các cột CSS Có {{Columns-list}} (bao bọc) – –
"Columns-start" CSS float Có {{Columns-start}} {{Column}} {{Columns-end}}
"Div col" Các cột CSS Có {{Div col}} – {{Div col end}}

dagger Tức là, các cột có thể xử lý đánh dấu wiki {| | || |- |} được sử dụng để tạo bảng? Nếu không, các mẫu tạo ra các phần tử này (chẳng hạn như {{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}) và/hoặc thẻ HTML (<table>...</table>, <tr>...</tr>, v.v.) sẽ cần được sử dụng thay thế.<section end="table" />

Tài liệu bên trên được truyền tải từ Bản mẫu:Columns/doc. (sửa | lịch sử)
Biên tập viên sửa đổi có thể thử nghiệm trong các trang chỗ thử (tạo | sao) và trường hợp kiểm thử (tạo) của bản mẫu này.
Xin hãy bổ sung các thể loại vào trang con /doc. Các trang con của bản mẫu này.
Lấy từ “https://wikibeta.org/index.php?title=Bản_mẫu:Columns&oldid=3426352”
Sửa đổi lần cuối lúc 16:28 vào ngày 29 tháng 10 năm 2016

Ngôn ngữ

    Trang này không có sẵn trong ngôn ngữ khác.

    Wikibeta, Bách khoa tri thức mở
    • Creative Commons Ghi công–Chia sẻ tương tự
    • Powered by MediaWiki
    • Trang này được sửa đổi lần cuối vào ngày 29 tháng 10 năm 2016, 16:28.
    • Nếu không có ghi chú khác, nội dung này được cấp phép Creative Commons Ghi công–Chia sẻ tương tự.
    • Chính sách quyền riêng tư
    • Giới thiệu Wikipedia
    • Lời phủ nhận
    • Phiên bản máy tính