CSS3 Tutorial-Multiple columns

Source: Internet
Author: User
Hello! Little friends, our last article CSS3 Tutorial-animation knowledge have you finished digesting it? The new multi-column layout (multi-column) in CSS3 is a powerful extension of the block layout pattern in traditional HTML Web pages. This new syntax allows web front-end developers to easily make text appear in multiple columns.

CSS3 Multiple columns:

With CSS3, you can create multiple columns to lay out your text – just like a newspaper!

In this chapter, you will learn the following multi-column properties:

1, Column-count;

2, Column-gap;

3, Column-rule.

Browser support:

Internet Explorer 10 and Opera support multi-column properties.

Firefox needs a prefix-moz-.

Chrome and Safari need a prefix of-webkit-.

Note: Multi-column properties are not supported in Internet Explorer 9 and earlier versions.

CSS3 Create multiple columns:

The Column-count attribute specifies the number of columns that the element should be delimited:

Instance:

Separate the text in the DIV element into three columns:

Div{-moz-column-count:3;/* Firefox */-webkit-column-count:3;/* Safari and Chrome */column-count:3;}

CSS3 Specifies the interval between columns:

The Column-gap property specifies the interval between columns:

Instance:

Specify a 40-pixel interval between columns:

div{-moz-column-gap:40px;/* Firefox */-webkit-column-gap:40px;/* Safari and Chrome */column-gap:40px;}

CSS3 Column Rules:

The Column-rule property sets the width, style, and color rules between columns.

Instance:

Specify the width, style, and color rules between columns:

div{-moz-column-rule:3px outset #ff0000;/* Firefox */-webkit-column-rule:3px outset #ff0000;/* Safari and Chrome */colum n-rule:3px outset #ff0000;}

New multi-Column properties:

The following table lists all the conversion properties:

The above is CSS3 Tutorial-multi-column content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.