Capital Initial Letters as Drop Caps Effect within a CSS3 Multi column - HTML CSS CSS Property

HTML CSS examples for CSS Property:column-count

Description

Capital Initial Letters as Drop Caps Effect within a CSS3 Multi column

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--from  w w w  . j  ava  2  s .co m-->
   margin:0
}

#multicolumn {
   column-count:4;
   -moz-column-count:4;
   -webkit-column-count:4;
   column-gap:54px;
   -moz-column-gap:54px;
   -webkit-column-gap:54px;
   column-rule-color:Chartreuse;
   -moz-column-rule-color:yellow;
   -webkit-column-rule-color:blue;
   column-rule-style:solid;
   -moz-column-rule-style:solid;
   -webkit-column-rule-style:solid;
   column-rule-width:2px;
   -moz-column-rule-width:2px;
   -webkit-column-rule-width:2px;
   width:81%;
   margin:21px auto;
}

#multicolumn p:first-letter {
   float:left;
   font-weight:normal;
   font-size:45px;
   margin:8px 2px 0px 0px;
   line-height:28px;
   background-color:pink;
}

@media (max-width: 769px)  {
   #multicolumn {
      column-count:3;
      -moz-column-count:3;
      -webkit-column-count:3;
      column-gap:24px;
      -moz-column-gap:24px;
      -webkit-column-gap:24px;
      column-rule-color:WhiteSmoke;
      -moz-column-rule-color:OrangeRed;
      -webkit-column-rule-color:grey;
      column-rule-style:solid;
      -moz-column-rule-style:solid;
      -webkit-column-rule-style:solid;
      column-rule-width:2px;
      -moz-column-rule-width:2px;
      -webkit-column-rule-width:2px;
      width:81%;
      margin:21px auto;
   }

}
</style> 
 </head> 
 <body> 
  <div id="multicolumn"> 
   <p>Ellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui miante.</p> 
   <span>&nbsp;</span> 
   <p>Aonec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.</p> 
   <span>&nbsp;</span> 
   <p>Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p> 
  </div>  
 </body>
</html>

Related Tutorials