CSS CSS 960网格(流体)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CSS CSS 960网格(流体)相关的知识,希望对你有一定的参考价值。
/*
960 Grid System ~ Core CSS.
Learn more ~ http://960.gs/
Licensed under GPL and MIT.
*/
/* =Containers
--------------------------------------------------------------------------------*/
.f_container_12,
.f_container_16
{
width: 92%;
margin-left: 4%;
margin-right: 4%;
}
.full_width{
width:100%;
}
/* =Grid >> Global
--------------------------------------------------------------------------------*/
.f_grid_1,
.f_grid_2,
.f_grid_3,
.f_grid_4,
.f_grid_5,
.f_grid_6,
.f_grid_7,
.f_grid_8,
.f_grid_9,
.f_grid_10,
.f_grid_11,
.f_grid_12,
.f_grid_13,
.f_grid_14,
.f_grid_15,
.f_grid_16
{
display: inline;
float: left;
margin-left: 1%;
margin-right: 1%;
}
.f_container_12 .f_grid_3,
.f_container_16 .f_grid_4
{
width: 23%;
}
.f_container_12 .f_grid_6,
.f_container_16 .f_grid_8
{
width: 48%;
}
.f_container_12 .f_grid_9,
.f_container_16 .f_grid_12
{
width: 73%;
}
.f_container_12 .f_grid_12,
.f_container_16 .f_grid_16
{
width: 98%;
}
/* =Grid >> Children (Alpha ~ First, Omega ~ Last)
--------------------------------------------------------------------------------*/
.alpha
{
margin-left: 0;
}
.omega
{
margin-right: 0;
}
/* =Grid >> 12 Columns
--------------------------------------------------------------------------------*/
.f_container_12 .f_grid_1
{
width: 6.333%;
}
.f_container_12 .f_grid_2
{
width: 14.666%;
}
.f_container_12 .f_grid_4
{
width: 31.333%;
}
.f_container_12 .f_grid_5
{
width: 39.666%;
}
.f_container_12 .f_grid_7
{
width: 56.333%;
}
.f_container_12 .f_grid_8
{
width: 64.666%;
}
.f_container_12 .f_grid_10
{
width: 81.333%;
}
.f_container_12 .f_grid_11
{
width: 89.666%;
}
/* =Grid >> 16 Columns
--------------------------------------------------------------------------------*/
.f_container_16 .f_grid_1
{
width: 4.25%;
}
.f_container_16 .f_grid_2
{
width: 10.5%;
}
.f_container_16 .f_grid_3
{
width: 16.75%;
}
.f_container_16 .f_grid_5
{
width: 29.25%;
}
.f_container_16 .f_grid_6
{
width: 35.5%;
}
.f_container_16 .f_grid_7
{
width: 41.75%;
}
.f_container_16 .f_grid_9
{
width: 54.25%;
}
.f_container_16 .f_grid_10
{
width: 60.5%;
}
.f_container_16 .f_grid_11
{
width: 66.75%;
}
.f_container_16 .f_grid_13
{
width: 79.25%;
}
.f_container_16 .f_grid_14
{
width: 85.5%;
}
.f_container_16 .f_grid_15
{
width: 91.75%;
}
/* =Prefix Extra Space >> Global
--------------------------------------------------------------------------------*/
.f_container_12 .f_prefix_3,
.f_container_16 .f_prefix_4
{
padding-left: 25%;
}
.f_container_12 .f_prefix_6,
.f_container_16 .f_prefix_8
{
padding-left: 50%;
}
.f_container_12 .f_prefix_9,
.f_container_16 .f_prefix_12
{
padding-left: 75%;
}
/* =Prefix Extra Space >> 12 Columns
--------------------------------------------------------------------------------*/
.f_container_12 .f_prefix_1
{
padding-left: 8.333%;
}
.f_container_12 .f_prefix_2
{
padding-left: 16.666%;
}
.f_container_12 .f_prefix_4
{
padding-left: 33.333%;
}
.f_container_12 .f_prefix_5
{
padding-left: 41.666%;
}
.f_container_12 .f_prefix_7
{
padding-left: 58.333%;
}
.f_container_12 .f_prefix_8
{
padding-left: 66.666%;
}
.f_container_12 .f_prefix_10
{
padding-left: 83.333%;
}
.f_container_12 .f_prefix_11
{
padding-left: 91.666%;
}
/* =Prefix Extra Space >> 16 Columns
--------------------------------------------------------------------------------*/
.f_container_16 .f_prefix_1
{
padding-left: 6.25%;
}
.f_container_16 .f_prefix_2
{
padding-left: 12.5%;
}
.f_container_16 .f_prefix_3
{
padding-left: 18.75%;
}
.f_container_16 .f_prefix_5
{
padding-left: 31.25%;
}
.f_container_16 .f_prefix_6
{
padding-left: 37.5%;
}
.f_container_16 .f_prefix_7
{
padding-left: 43.75%;
}
.f_container_16 .f_prefix_9
{
padding-left: 56.25%;
}
.f_container_16 .f_prefix_10
{
padding-left: 62.5%;
}
.f_container_16 .f_prefix_11
{
padding-left: 68.75%;
}
.f_container_16 .f_prefix_13
{
padding-left: 81.25%;
}
.f_container_16 .f_prefix_14
{
padding-left: 87.5%;
}
.f_container_16 .f_prefix_15
{
padding-left: 93.75%;
}
/* =Suffix Extra Space >> Global
--------------------------------------------------------------------------------*/
.f_container_12 .f_suffix_3,
.f_container_16 .f_suffix_4
{
padding-right: 25%;
}
.f_container_12 .f_suffix_6,
.f_container_16 .f_suffix_8
{
padding-right: 50%;
}
.f_container_12 .f_suffix_9,
.f_container_16 .f_suffix_12
{
padding-right: 75%;
}
/* =Suffix Extra Space >> 12 Columns
--------------------------------------------------------------------------------*/
.f_container_12 .f_suffix_1
{
padding-right: 8.333%;
}
.f_container_12 .f_suffix_2
{
padding-right: 16.666%;
}
.f_container_12 .f_suffix_4
{
padding-right: 33.333%;
}
.f_container_12 .f_suffix_5
{
padding-right: 41.666%;
}
.f_container_12 .f_suffix_7
{
padding-right: 58.333%;
}
.f_container_12 .f_suffix_8
{
padding-right: 66.666%;
}
.f_container_12 .f_suffix_10
{
padding-right: 83.333%;
}
.f_container_12 .f_suffix_11
{
padding-right: 91.666%;
}
/* =Suffix Extra Space >> 16 Columns
--------------------------------------------------------------------------------*/
.f_container_16 .f_suffix_1
{
padding-right: 6.25%;
}
.f_container_16 .f_suffix_2
{
padding-right: 16.5%;
}
.f_container_16 .f_suffix_3
{
padding-right: 18.75%;
}
.f_container_16 .f_suffix_5
{
padding-right: 31.25%;
}
.f_container_16 .f_suffix_6
{
padding-right: 37.5%;
}
.f_container_16 .f_suffix_7
{
padding-right: 43.75%;
}
.f_container_16 .f_suffix_9
{
padding-right: 56.25%;
}
.f_container_16 .f_suffix_10
{
padding-right: 62.5%;
}
.f_container_16 .f_suffix_11
{
padding-right: 68.75%;
}
.f_container_16 .f_suffix_13
{
padding-right: 81.25%;
}
.f_container_16 .f_suffix_14
{
padding-right: 87.5%;
}
.f_container_16 .f_suffix_15
{
padding-right: 93.75%;
}
/* =Clear Floated Elements
--------------------------------------------------------------------------------*/
/* http://sonspring.com/journal/clearing-floats */
html body * span.clear,
html body * div.clear,
html body * li.clear,
html body * dd.clear
{
background: none;
border: 0;
clear: both;
display: block;
float: none;
font-size: 0;
list-style: none;
margin: 0;
padding: 0;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
/* http://www.positioniseverything.net/easyclearing.html */
.clearfix:after
{
clear: both;
content: '.';
display: block;
visibility: hidden;
height: 0;
}
.clearfix
{
display: inline-block;
}
* html .clearfix
{
height: 1%;
}
.clearfix
{
display: block;
}
以上是关于CSS CSS 960网格(流体)的主要内容,如果未能解决你的问题,请参考以下文章