Skip to content

Instantly share code, notes, and snippets.

@morrxy
Created February 22, 2013 09:07
Show Gist options
  • Save morrxy/5011925 to your computer and use it in GitHub Desktop.
Save morrxy/5011925 to your computer and use it in GitHub Desktop.
CSS: hjlist.less
/*
<ul class="lh">
<li></li>
</ul>
*/
ul.lh, ol.lh {
list-style: none;
overflow:hidden;
> li {
float:left;
}
}
/*
<ul class="lv">
<li class="lvi">
<div class="lvd"></div>
</li>
</ul>
put list item in .lvd
*/
ul.lv, ol.lv {
list-style: none;
> li.lvi {
float: none;
*display:inline;/*remove ie6,7 li space bug*/
}
}
/*
<ul class="lhi">
<li></li>
</ul>
*/
ul.lhi, ol.lhi {
list-style: none;
> li {
display:inline;
}
}
// .l2c,.l3c,.l4c,.l5c,.l6c,.l7c,.l8c,.l9c,.l10c{overflow:hidden;}.l2c li{float:left;width:50%; *width:49.99%;}.l3c li{float:left;width:33.33333%;*width:33.2%}.l4c li{float:left;width:25%; *width:24.99%;}.l5c li{float:left;width:20%;*width:19.98%;}.l6c li{float:left;width:16.66%;}.l7c li{float:left;width:14.28%;}.l8c li{float:left;width:12.5%;}.l9c li{float:left;width:11.11%;}.l10c li{float:left;width:10%;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment