Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Foundation CSS Reference Manual

Foundation CSS Reference Manual


Foundation Default Settings

Foundation uses the browser's default font size (font-size:100%). For most desktop browsers, the font size defaults to 16px. For mobile browsers, the default font size is 12px. The default font is "Helvetica Neue", and line-height defaults to 1.5。

These settings apply to elements inside the element.

In addition,

The element has a bottom margin (margin-bottom) of 1.25rem and a line-height of 1.6.


Text

For the following HTML elements, Foundation sets independent styles to render them and does not use browser default styles. Click "Try it" to view the online example.

Element Description Online example

-

h1 - h6 headings Try it
Light blue links; hovering over a link will underline it Try it
Light gray subtitle text Try it
Blockquote module Try it
Bold text Try it
italic Try it
Abbreviation of a specified word. Using this element, the text appears with a dotted underline and shows a tooltip on hover Try it
Receives keyboard input commands: CTRL + P Try it

Horizontal Line Try it
Code Snippets Try it
    Unordered list Try it
      Ordered list Try it
      Description Lists Try it

      Text Alignment

      Use CSS classes to modify text alignment:

      class Description Example
      .text-left Left-aligned Text Try it
      .text-right Right-aligned Text Try it
      .text-center Centering Try it
      .text-justify Justified Text Try it

      Alignment for Different Screen Sizes

      Use CSS classes to modify text alignment for different screen sizes:

      class Description Example
      Left align    
      .small-text-left Left-align on all screen sizes Try it
      .small-only-text-left Left-align on small screens (width less than 40em) Try it
      .medium-text-left Left-align on screens wider than 40.0625em Try it
      .medium-only-text-left Left-align on screens between 40.0625em and 64em Try it
      .large-text-left Left-align on screens wider than 64.0625em Try it
      .large-only-text-left Left-align on screens between 64.0625em and 90em Try it
      .xlarge-text-left Left-align on screens wider than 90.0625em Try it
      .xlarge-only-text-left Left-align on screens between 90.0625em and 120em Try it
      .xxlarge-text-left Left-align on screens wider than 120em Try it
           
      Align right    
      .small-text-right Right-align on all screen sizes Try it
      .small-only-text-right Right-align on small screens (width less than 40em) Try it
      .medium-text-right Right-align on screens wider than 40.0625em Try it
      .medium-only-text-right Right-align on screens between 40.0625em and 64em Try it
      .large-text-right Right-align on screens wider than 64.0625em Try it
      .large-only-text-right Right-align on screens between 64.0625em and 90em Try it
      .xlarge-text-right Right-align on screens wider than 90.0625em Try it
      .xlarge-only-text-right Right-align on screens between 90.0625em and 120em Try it
      .xxlarge-text-right Right-align on screens wider than 120em Try it
           
      Center Alignment    
      .small-text-center Center-align on all screen sizes Try it
      .small-only-text-center Center-align on small screens (width less than 40em) Try it
      .medium-text-center Center-align on screens wider than 40.0625em Try it
      .medium-only-text-center Center-align on screens between 40.0625em and 64em Try it
      .large-text-center Center-align on screens wider than 64.0625em Try it
      .large-only-text-center Center-align on screens between 64.0625em and 90em Try it
      .xlarge-text-center Center-align on screens wider than 90.0625em Try it
      .xlarge-only-text-center Center-align on screens between 90.0625em and 120em Try it
      .xxlarge-text-center Center-align on screens wider than 120em Try it
           
      Justified Text    
      .small-text-justify Justify on all screen sizes Try it
      .small-only-text-justify Justify on small screens (width less than 40em) Try it
      .medium-text-justify Justify on screens wider than 40.0625em Try it
      .medium-only-text-justify Justify on screens between 40.0625em and 64em Try it
      .large-text-justify Justify on screens wider than 64.0625em Try it
      .large-only-text-justify Justify on screens between 64.0625em and 90em Try it
      .xlarge-text-justify Justify on screens wider than 90.0625em Try it
      .xlarge-only-text-justify Justify on screens between 90.0625em and 120em Try it
      .xxlarge-text-justify Justify on screens wider than 120em Try it

      Others

      class Description Example
      .left Float element to the left Try it
      .right Float element to the right Try it
      .clearfix Clear floats - must be added on the parent element of the floated element
      .hide Hide element (CSS display: none) Try it
      .list-inline Set all elements on the same line Try it
      .lead Makes

      Make an element more prominent

      Try it
      .subheader Set the light-colored

      -

      Element
      Try it