Home

Awesome

Flag-css

CSS for SVG country flag icons with PNG fallback (all alpha-2, alpha-3, numeric, IOC and FIFA are all supported). See the demo.

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

Install

bower:

    bower install --save flag-css

Or download

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>. Or using flag-ioc-xxx or flag-fifa-xxx (where xxx either the IOC or FIFA of a country). Example:

<span class="flag flag-hkg"></span>
<span class="flag flag-hk"></span>
<span class="flag flag-344"></span>
<span class="flag flag-ioc-hkg"></span>
<span class="flag flag-fifa-hkg"></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>

Flag list

FlagElementAlpha 3Alpha 2NumericIOCFIFA
<span class="flag flag-abw"></span>abwaw533aruaru
<span class="flag flag-afg"></span>afgaf4afgafg
<span class="flag flag-ago"></span>agoao24angang
<span class="flag flag-aia"></span>aiaai660aiaaia
<span class="flag flag-ala"></span>alaax248ald
<span class="flag flag-alb"></span>albal8albalb
<span class="flag flag-and"></span>andad20andand
<span class="flag flag-are"></span>areae784uaeuae
<span class="flag flag-arg"></span>argar32argarg
<span class="flag flag-arm"></span>armam51armarm
<span class="flag flag-asm"></span>asmas16asaasa
<span class="flag flag-ata"></span>ataaq10ros
<span class="flag flag-atf"></span>atftf260
<span class="flag flag-atg"></span>atgag28antatg
<span class="flag flag-aus"></span>ausau36ausaus
<span class="flag flag-aut"></span>autat40autaut
<span class="flag flag-aze"></span>azeaz31azeaze
<span class="flag flag-bdi"></span>bdibi108bdibdi
<span class="flag flag-bel"></span>belbe56belbel
<span class="flag flag-ben"></span>benbj204benben
<span class="flag flag-bes"></span>besbq535ahoant
<span class="flag flag-bfa"></span>bfabf854burbfa
<span class="flag flag-bgd"></span>bgdbd50banban
<span class="flag flag-bgr"></span>bgrbg100bulbul
<span class="flag flag-bhr"></span>bhrbh48brnbhr
<span class="flag flag-bhs"></span>bhsbs44bahbah
<span class="flag flag-bih"></span>bihba70bihbih
<span class="flag flag-blm"></span>blmbl652
<span class="flag flag-blr"></span>blrby112blrblr
<span class="flag flag-blz"></span>blzbz84bizblz
<span class="flag flag-bmu"></span>bmubm60berber
<span class="flag flag-bol"></span>bolbo68bolbol
<span class="flag flag-bra"></span>brabr76brabra
<span class="flag flag-brb"></span>brbbb52barbrb
<span class="flag flag-brn"></span>brnbn96brubru
<span class="flag flag-btn"></span>btnbt64bhubhu
<span class="flag flag-bvt"></span>bvtbv74
<span class="flag flag-bwa"></span>bwabw72botbot
<span class="flag flag-caf"></span>cafcf140cafcta
<span class="flag flag-can"></span>canca124cancan
<span class="flag flag-cck"></span>cckcc166cck
<span class="flag flag-che"></span>chech756suisui
<span class="flag flag-chl"></span>chlcl152chichi
<span class="flag flag-chn"></span>chncn156chnchn
<span class="flag flag-civ"></span>civci384civciv
<span class="flag flag-cmr"></span>cmrcm120cmrcmr
<span class="flag flag-cod"></span>codcd180codcod
<span class="flag flag-cog"></span>cogcg178cgocgo
<span class="flag flag-cok"></span>cokck184cokcok
<span class="flag flag-col"></span>colco170colcol
<span class="flag flag-com"></span>comkm174comcom
<span class="flag flag-cpv"></span>cpvcv132cpvcpv
<span class="flag flag-cri"></span>cricr188crccrc
<span class="flag flag-cub"></span>cubcu192cubcub
<span class="flag flag-cuw"></span>cuwcw531
<span class="flag flag-cxr"></span>cxrcx162cxr
<span class="flag flag-cym"></span>cymky136caycay
<span class="flag flag-cyp"></span>cypcy196cypcyp
<span class="flag flag-cze"></span>czecz203czecze
<span class="flag flag-deu"></span>deude276gerger
<span class="flag flag-dji"></span>djidj262djidji
<span class="flag flag-dma"></span>dmadm212dmadma
<span class="flag flag-dnk"></span>dnkdk208denden
<span class="flag flag-dom"></span>domdo214domdom
<span class="flag flag-dza"></span>dzadz12algalg
<span class="flag flag-ecu"></span>ecuec218ecuecu
<span class="flag flag-egy"></span>egyeg818egyegy
<span class="flag flag-eri"></span>erier232erieri
<span class="flag flag-esh"></span>esheh732sah
<span class="flag flag-esp"></span>espes724espesp
<span class="flag flag-est"></span>estee233estest
<span class="flag flag-eth"></span>ethet231etheth
<span class="flag flag-fin"></span>finfi246finfin
<span class="flag flag-fji"></span>fjifj242fijfij
<span class="flag flag-flk"></span>flkfk238flkflk
<span class="flag flag-fra"></span>frafr250frafra
<span class="flag flag-fro"></span>frofo234farfro
<span class="flag flag-fsm"></span>fsmfm583fsmfsm
<span class="flag flag-gab"></span>gabga266gabgab
<span class="flag flag-gbr"></span>gbrgb826gbr
<span class="flag flag-geo"></span>geoge268geogeo
<span class="flag flag-ggy"></span>ggygg831gbg
<span class="flag flag-gha"></span>ghagh288ghagha
<span class="flag flag-gib"></span>gibgi292gibgbz
<span class="flag flag-gin"></span>gingn324guigui
<span class="flag flag-glp"></span>glpgp312gudglp
<span class="flag flag-gmb"></span>gmbgm270gamgam
<span class="flag flag-gnb"></span>gnbgw624gbsgnb
<span class="flag flag-gnq"></span>gnqgq226geqeqg
<span class="flag flag-grc"></span>grcgr300gregre
<span class="flag flag-grd"></span>grdgd308grngrn
<span class="flag flag-grl"></span>grlgl304grlgrl
<span class="flag flag-gtm"></span>gtmgt320guagua
<span class="flag flag-guf"></span>gufgf254fguguf
<span class="flag flag-gum"></span>gumgu316gumgum
<span class="flag flag-guy"></span>guygy328guyguy
<span class="flag flag-hkg"></span>hkghk344hkghkg
<span class="flag flag-hmd"></span>hmdhm334
<span class="flag flag-hnd"></span>hndhn340honhon
<span class="flag flag-hrv"></span>hrvhr191crocro
<span class="flag flag-hti"></span>htiht332haihai
<span class="flag flag-hun"></span>hunhu348hunhun
<span class="flag flag-idn"></span>idnid360inaidn
<span class="flag flag-imn"></span>imnim833gbm
<span class="flag flag-ind"></span>indin356indind
<span class="flag flag-iot"></span>iotio86
<span class="flag flag-irl"></span>irlie372irlirl
<span class="flag flag-irn"></span>irnir364iriirn
<span class="flag flag-irq"></span>irqiq368irqirq
<span class="flag flag-isl"></span>islis352islisl
<span class="flag flag-isr"></span>isril376isrisr
<span class="flag flag-ita"></span>itait380itaita
<span class="flag flag-jam"></span>jamjm388jamjam
<span class="flag flag-jey"></span>jeyje832gbj
<span class="flag flag-jor"></span>jorjo400jorjor
<span class="flag flag-jpn"></span>jpnjp392jpnjpn
<span class="flag flag-kaz"></span>kazkz398kazkaz
<span class="flag flag-ken"></span>kenke404kenken
<span class="flag flag-kgz"></span>kgzkg417kgzkgz
<span class="flag flag-khm"></span>khmkh116camcam
<span class="flag flag-kir"></span>kirki296kirkir
<span class="flag flag-kna"></span>knakn659sknskn
<span class="flag flag-kor"></span>korkr410korkor
<span class="flag flag-kwt"></span>kwtkw414kuwkuw
<span class="flag flag-lao"></span>laola418laolao
<span class="flag flag-lbn"></span>lbnlb422liblib
<span class="flag flag-lbr"></span>lbrlr430lbrlbr
<span class="flag flag-lby"></span>lbyly434lbalby
<span class="flag flag-lca"></span>lcalc662lcalca
<span class="flag flag-lie"></span>lieli438lielie
<span class="flag flag-lka"></span>lkalk144srisri
<span class="flag flag-lso"></span>lsols426lesles
<span class="flag flag-ltu"></span>ltult440ltultu
<span class="flag flag-lux"></span>luxlu442luxlux
<span class="flag flag-lva"></span>lvalv428latlva
<span class="flag flag-mac"></span>macmo446macmac
<span class="flag flag-maf"></span>mafmf663
<span class="flag flag-mar"></span>marma504marmar
<span class="flag flag-mco"></span>mcomc492monmon
<span class="flag flag-mda"></span>mdamd498mdamda
<span class="flag flag-mdg"></span>mdgmg450madmad
<span class="flag flag-mdv"></span>mdvmv462mdvmdv
<span class="flag flag-mex"></span>mexmx484mexmex
<span class="flag flag-mhl"></span>mhlmh584mshmhl
<span class="flag flag-mkd"></span>mkdmk807mkdmkd
<span class="flag flag-mli"></span>mliml466mlimli
<span class="flag flag-mlt"></span>mltmt470mltmlt
<span class="flag flag-mmr"></span>mmrmm104myamya
<span class="flag flag-mne"></span>mneme499mgomne
<span class="flag flag-mng"></span>mngmn496mglmng
<span class="flag flag-mnp"></span>mnpmp580nmanmi
<span class="flag flag-moz"></span>mozmz508mozmoz
<span class="flag flag-mrt"></span>mrtmr478mtnmtn
<span class="flag flag-msr"></span>msrms500mntmsr
<span class="flag flag-mtq"></span>mtqmq474mrtmtq
<span class="flag flag-mus"></span>musmu480mrimri
<span class="flag flag-mwi"></span>mwimw454mawmwi
<span class="flag flag-mys"></span>mysmy458masmas
<span class="flag flag-myt"></span>mytyt175maymyt
<span class="flag flag-nam"></span>namna516namnam
<span class="flag flag-ncl"></span>nclnc540ncdncl
<span class="flag flag-ner"></span>nerne562nignig
<span class="flag flag-nfk"></span>nfknf574nfinfk
<span class="flag flag-nga"></span>ngang566ngrnga
<span class="flag flag-nic"></span>nicni558ncanca
<span class="flag flag-niu"></span>niunu570niuniu
<span class="flag flag-nld"></span>nldnl528nedned
<span class="flag flag-nor"></span>norno578nornor
<span class="flag flag-npl"></span>nplnp524nepnep
<span class="flag flag-nru"></span>nrunr520nrunru
<span class="flag flag-nzl"></span>nzlnz554nzlnzl
<span class="flag flag-omn"></span>omnom512omaoma
<span class="flag flag-pak"></span>pakpk586pakpak
<span class="flag flag-pan"></span>panpa591panpan
<span class="flag flag-pcn"></span>pcnpn612pcn
<span class="flag flag-per"></span>perpe604perper
<span class="flag flag-phl"></span>phlph608phiphi
<span class="flag flag-plw"></span>plwpw585plwplw
<span class="flag flag-png"></span>pngpg598pngpng
<span class="flag flag-pol"></span>polpl616polpol
<span class="flag flag-pri"></span>pripr630purpur
<span class="flag flag-prk"></span>prkkp408prkprk
<span class="flag flag-prt"></span>prtpt620porpor
<span class="flag flag-pry"></span>prypy600parpar
<span class="flag flag-pse"></span>pseps275pleple
<span class="flag flag-pyf"></span>pyfpf258fpotah2
<span class="flag flag-qat"></span>qatqa634qatqat
<span class="flag flag-reu"></span>reure638reureu
<span class="flag flag-rou"></span>rouro642rourou
<span class="flag flag-rus"></span>rusru643rusrus
<span class="flag flag-rwa"></span>rwarw646rwarwa
<span class="flag flag-sau"></span>sausa682ksaksa
<span class="flag flag-sdn"></span>sdnsd729sudsud
<span class="flag flag-sen"></span>sensn686sensen
<span class="flag flag-sgp"></span>sgpsg702sinsin
<span class="flag flag-sgs"></span>sgsgs239
<span class="flag flag-shn"></span>shnsh654helshn
<span class="flag flag-sjm"></span>sjmsj744
<span class="flag flag-slb"></span>slbsb90solsol
<span class="flag flag-sle"></span>slesl694slesle
<span class="flag flag-slv"></span>slvsv222esaslv
<span class="flag flag-smr"></span>smrsm674smrsmr
<span class="flag flag-som"></span>somso706somsom
<span class="flag flag-spm"></span>spmpm666spmspm
<span class="flag flag-srb"></span>srbrs688srbsrb
<span class="flag flag-ssd"></span>ssdss728
<span class="flag flag-stp"></span>stpst678stpstp
<span class="flag flag-sur"></span>sursr740sursur
<span class="flag flag-svk"></span>svksk703svksvk
<span class="flag flag-svn"></span>svnsi705slosvn
<span class="flag flag-swe"></span>swese752sweswe
<span class="flag flag-swz"></span>swzsz748swzswz
<span class="flag flag-sxm"></span>sxmsx534
<span class="flag flag-syc"></span>sycsc690seysey
<span class="flag flag-syr"></span>syrsy760syrsyr
<span class="flag flag-tca"></span>tcatc796tkstca
<span class="flag flag-tcd"></span>tcdtd148chacha
<span class="flag flag-tgo"></span>tgotg768togtog
<span class="flag flag-tha"></span>thath764thatha
<span class="flag flag-tjk"></span>tjktj762tjktjk
<span class="flag flag-tkl"></span>tkltk772tkl
<span class="flag flag-tkm"></span>tkmtm795tkmtkm
<span class="flag flag-tls"></span>tlstl626tlstls
<span class="flag flag-ton"></span>tonto776tgatga
<span class="flag flag-tto"></span>ttott780ttotri
<span class="flag flag-tun"></span>tuntn788tuntun
<span class="flag flag-tur"></span>turtr792turtur
<span class="flag flag-tuv"></span>tuvtv798tuvtuv
<span class="flag flag-twn"></span>twntw158tpetpe
<span class="flag flag-tza"></span>tzatz834tantan
<span class="flag flag-uga"></span>ugaug800ugauga
<span class="flag flag-ukr"></span>ukrua804ukrukr
<span class="flag flag-umi"></span>umium581
<span class="flag flag-ury"></span>uryuy858uruuru
<span class="flag flag-usa"></span>usaus840usausa
<span class="flag flag-uzb"></span>uzbuz860uzbuzb
<span class="flag flag-vat"></span>vatva336vat
<span class="flag flag-vct"></span>vctvc670vinvin
<span class="flag flag-ven"></span>venve862venven
<span class="flag flag-vgb"></span>vgbvg92ivbvgb
<span class="flag flag-vir"></span>virvi850isvvir
<span class="flag flag-vnm"></span>vnmvn704vievie
<span class="flag flag-vut"></span>vutvu548vanvan
<span class="flag flag-wlf"></span>wlfwf876wafwlf
<span class="flag flag-wsm"></span>wsmws882samsam
<span class="flag flag-yem"></span>yemye887yemyem
<span class="flag flag-zaf"></span>zafza710rsarsa
<span class="flag flag-zmb"></span>zmbzm894zamzam
<span class="flag flag-zwe"></span>zwezw716zimzim

Todo's

License

MIT

Development

Ubuntu:

apt-get install imagemagick
apt-get install graphicsmagick

Mac OS X (using Homebrew):

brew install imagemagick
brew install graphicsmagick