GithubHelp home page GithubHelp logo

necolas / css3-facebook-buttons Goto Github PK

View Code? Open in Web Editor NEW
577.0 29.0 111.0 31 KB

Simple CSS to recreate the appearance of Facebook's buttons and toolbars.

Home Page: http://necolas.github.io/css3-facebook-buttons/

License: MIT License

CSS 70.00% HTML 30.00%

css3-facebook-buttons's Introduction

CSS3 Facebook-style Buttons

unmaintained

Facebook-style buttons and button groups. Default and large sizes.

Buttons

To create the default "button" add a class of uibutton to any appropriate element. To create the blue variant include the additional class confirm. To create the green variant include an additional class special.

<a class="uibutton" href="#">Button</a>
<button class="uibutton" type="submit">Button</button>
<input class="uibutton" type="submit" value="Button">

Larger buttons

To create larger buttons include an additional class of large

<a class="uibutton large" href="#button">Search</a>

Grouped buttons

To created grouped buttons wrap them in an element, or use a list, given the class uibutton-group.

<div class="uibutton-group">
    <a href="#button" class="uibutton">Dashboard</a>
    <a href="#button" class="uibutton">Inbox</a>
    <a href="#button" class="uibutton">Account</a>
    <a href="#button" class="uibutton">Logout</a>
</div>

<ul class="uibutton-group">
    <li><a href="#button" class="uibutton">Dashboard</a></li>
    <li><a href="#button" class="uibutton">Inbox</a></li>
    <li><a href="#button" class="uibutton">Account</a></li>
    <li><a href="#button" class="uibutton">Logout</a></li>
</ul>

Mixed groups

To display a toolbar of buttons and grouped buttons, use a wrapping element given the class uibutton-toolbar.

<div class="uibutton-toolbar">
    <a href="#button" class="uibutton">Mark as unread</a>

    <div class="uibutton-group">
        <a href="#button" class="uibutton">Report spam</a>
        <a href="#button" class="uibutton">Delete</a>
    </div>

    <a href="#button" class="uibutton">Unsubscribe</a>
</div>

Buttons with icons

A range of icons can be added (only for links and buttons) by adding a class of icon and any one of the provided icon classes.

<a href="#" class="button icon add">New message</a>

Browser support

  • Firefox 3.5+
  • Google Chrome
  • Safari 4+
  • IE 6+
  • Opera 11.10+

Note: Some CSS3 enhancements are not supported in older versions of Opera and IE. The use of icons is not supported in IE 6 or IE 7.

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.