column-count属性(CSS设置)
column-count属性(CSS设置)
CSS中的column-count特点用于将任何HTML元素内的一部分内容划分为给定的列数。
用法:
column-count:number|auto|initial|inherit;
特点值:
number:此值用于指示列数。
auto:它是默认值。由其他特点确认的列数。
initial:此值用于将特点设置为默认值。
inherit:它从其父级继承特点。
典范1:
--HTMLprogramtoillustratethe
column-countproperty-->
DOCTYPEhtml>
<html>
<head>
<title>columncountpropertytitle>
<style>
.gfg{
-webkit-column-count:2;
-moz-column-count:2;
column-count:2;/*dividestextin2columns*/}
h1{
color:green;
}
h1,h2{
text-align:center;
}
style>
head>
<body>
<h1>
GeeksforGeeksh1>
<h2>
Exampleofcolumn-countPropertyh2>
--Textinsidebelowdivwillbe
dividedinto2columns-->
<divclass="gfg">
Thecourseisdesignedforstudentsas
wellasworkingprofessionalstoprepare
forcodinginterviews.Thiscourseisgoing
tohavecodingquestionsfromschoollevel
tothelevelneededforproductbased
companieslikeAmazom,Microsoft,Adobeetc.
div>
body>
html>
输出:
典范2:
--HTMLprogramforcolumn-countpropertyofCSS-->
DOCTYPEhtml>
<html>
<head>
<title>columncountpropertytitle>
<style>
.gfg{
-webkit-column-count:2;
-moz-column-count:2;
column-count:2;
-webkit-column-rule:10pxdoublegreen;
-moz-column-rule:10pxdoublegreen;
column-rule:10pxdoublegreen;
text-align:justify;
}
h1{
color:green;
}
h1,h2{
text-align:center;
}
style>
head>
<body>
<h1>
GeeksforGeeksh1>
<h2>
Examplecolumn-countPropertyh2>
--Thetextinsidebelowdivwillbedividedinto
2columns-->
<divclass="gfg">
Thecourseisdesignedforstudentsaswellasworkingprofessionalstopreparefor
codinginterviews.Thiscourseisgoingto
havecodingquestionsfromschoollevelto
thelevelneededforproductbasedcompanies
likeAmazom,Microsoft,Adobe,etc.
div>
body>
html>
输出:
作品标签: CSS
优秀作品:
最新作品:
评论列表(共201人参与)参与讨论或分享设计作品获得视觉癖积分奖励
海报从版别注册会员
2021-07-25 14:52:9
riptLeveII,并支撑OPI等规范,同时飞扬排版软件采用了开放式的字体名,使字体名答应由用户自己增添或修正,以习惯其它公司所采用的字体名。Windows95风格的专业协助体系781 4开3905436开36239
回复解,HT注册会员
2021-07-25 0:43:26
1.鸿雁,向游客
2021-07-25 9:13:10
游客72801:column-count属性高兴就好!群发哦! 6.粉红花骨朵,白白小熊衫,蹦蹦跳跳小碎步,甜甜蜜蛮浅笑颜。最心爱的造型,最生动的行径,过最愉快的愚人节!朋友,节日高兴! 5mm4开540mm*380mm 手提袋规范尺度:400mm*285mm*80mm 信纸、便
回复灰色。 注册会员
2021-07-25 8:47:3
auto:它是默认值。由其他特点确认的列数。 initia后开端发传单,比如说,上班的高峰期七点到八点钟是人流比较多的时分,那么就要做好预备啦。 扩展资料:
回复