📜  如何使用 CSS 将文本分成两列布局?

📅  最后修改于: 2021-09-01 02:20:16             🧑  作者: Mango

本文的目的是通过使用CSS column属性将文本分成两列。此属性用于设置列数和这些列的宽度。

句法:

columns: column-width columns-count | auto | initial | inherit;

例子:

HTML


  

    

  

  
    

        How to divide the text in the division         element into two columns using css?     

       
        

Welcome to the world of Geeks!!

        How many times were you frustrated while         looking out for a good collection of         programming/algorithm/interview questions?         What did you expect and what did you get?         This portal has been created to provide well         written, well thought and well-explained         solutions for selected questions.            

            Our team includes:         

            Sandeep Jain: An IIT Roorkee alumnus             and founder of GeeksforGeeks. He loves             to solve programming problems in most             efficient ways. Apart from GeeksforGeeks,             he has worked with DE Shaw and Co. as a             software developer and JIIT Noida as an             assistant professor.         

           

            Vaibhav Bajpai: Amazed by computer             science, he is a technology enthusiast who             enjoys being a part of a development. Off             from work, you canfind him in love with             movies, food, and friends.         

           

            Shikhar Goel: A Computer Science graduate             who likes to make things simpler. When he's             not working, you can find him surfing the web,             learning facts, tricks and life hacks.             He also enjoys movies in his leisure time.         

           

            Dharmesh Singh: A software developer who             is always trying to push boundaries in search             of great breakthroughs. Off from his desk,             you can find him cheering up his buddies             and enjoying life.         

           

            Shubham Baranwal: A passionate developer             who always tries to learn new technology and             software. In his free time, either he reads             some articles or learns some other stuff.         

    
  


输出:

下面列出了支持的浏览器:

  • 谷歌浏览器 43.0
  • 浏览器 10.0
  • 火狐 16.0
  • 歌剧 30.0
  • Safari 9.0