Git Product home page Git Product logo

fullwidthheadline's Introduction

Full Width Headlines

A jQuery plugin for creating headlines that span the full width utilizing the CSS flexbox model. See some examples here: https://flekschas.github.io/FullWidthHeadline

Usage

CSS:

.full-width-hl .container {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;

    /* Old Syntax */
    -webkit-box-orient: horizontal;
       -moz-box-orient: horizontal;
            box-orient: horizontal;
    -webkit-box-align: center;
       -moz-box-align: center;
            box-align: center;
    -webkit-box-pack: center;
       -moz-box-pack: center;
            box-pack: center;

    /* New syntax */
    -webkit-flex-flow: row nowrap;
        -ms-flex-flow: row nowrap;
            flex-flow: row nowrap;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
        -ms-flex-pack: justify;
            justify-content: space-between;
            
    text-align: center;
    text-transform: uppercase;
    line-height: 1;
    overflow: hidden;
    white-space: nowrap;
    -webkit-transition: font-size 0.3s ease;
       -moz-transition: font-size 0.3s ease;
         -o-transition: font-size 0.3s ease;
            transition: font-size 0.3s ease;
}

.full-width-hl .centered-words {
    -webkit-justify-content: center;
            justify-content: center;
}

.full-width-hl .container span {
    margin-left: 0.25em;
}

.full-width-hl .container span:first-child {
    margin-left: 0;
}

.full-width-hl:hover .container span {
    color: #000;
    background: yellow;
}

HTML:

<h1 class="full-width-hl">A full width headline</h1>

JavaScript:

$('.full-width-hl').fullWidthHeadline();

Browser Support

  • Chrome >= 19
  • Firefox >= 5
  • Safari >= 6
  • Opera >= 12.15
  • Internet Exploror >= 10

Node: The plugin potentially works in other browser too. The ones named above have been tested explicitely.

fullwidthheadline's People

Contributors

flekschas avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.