GithubHelp home page GithubHelp logo

filoz / flag-css Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 7kfpun/flag-css

0.0 1.0 0.0 23.34 MB

CSS for SVG country flags with PNG fallback.

Home Page: http://7kfpun.github.io/flag-css

License: MIT License

CSS 59.40% JavaScript 3.40% HTML 37.20%

flag-css's Introduction

Flag-css

CSS for SVG country flags with PNG fallback. See the demo.

As a backend developer, I prefer ISO_3166-1 alpha-3.

  • All flags from Wikimedia
  • Use ISO 3166-1, all alpha-2, alpha-3 and numeric are supported
  • Respect flag's original ratio
  • Flag-css CSS, LESS, and Sass files are licensed under the MIT License

install

bower:

    bower install --save flag-css

Usage

For using the flags inline with text add the classes .flag with .flag-xxx or .flag-xx (where xxx is the ISO 3166-1-alpha-3 or ISO 3166-1-numeric and xx is the ISO 3166-1-alpha-2 of a country) to an empty <span>. Example:

<span class="flag flag-hkg"></span>
<span class="flag flag-hk"></span>
<span class="flag flag-344"></span>

Sizing

<span class="flag flag-hkg flag-2x"></span>
<span class="flag flag-hkg flag-3x"></span>
<span class="flag flag-hkg flag-4x"></span>
                  ⋮
                  ⋮
<span class="flag flag-hkg flag-10x"></span>

Rotating and flipping

<span class="flag flag-hkg flag-rotate-90"></span>
<span class="flag flag-hkg flag-rotate-180"></span>
<span class="flag flag-hkg flag-rotate-270"></span>
<span class="flag flag-hkg flag-flip-horizontal"></span>
<span class="flag flag-hkg flag-flip-vertical"></span>

Todo's

  • 3×4 flag ratio available

License

MIT

Development

Ubuntu:

apt-get install imagemagick
apt-get install graphicsmagick

Mac OS X (using Homebrew):

brew install imagemagick
brew install graphicsmagick

flag-css's People

Contributors

7kfpun avatar faitno avatar

Watchers

Filippo Lazzarini 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.