Fɔ bigin fɔ wok
Wan ɔvaviu fɔ Bootstrap, aw fɔ dawnlod ɛn yuz, di bɛsis tɛmplat ɛn ɛgzampul dɛn, ɛn ɔda tin dɛn.
Wan ɔvaviu fɔ Bootstrap, aw fɔ dawnlod ɛn yuz, di bɛsis tɛmplat ɛn ɛgzampul dɛn, ɛn ɔda tin dɛn.
Bootstrap (naw v3.3.7) gɛt sɔm izi we dɛn fɔ bigin kwik kwik wan, ɛni wan pan dɛn de apil to difrɛn skil lɛvɛl ɛn yus kes. Rid fɔ si wetin fit yu patikyula nid dɛn.
Dɛn dɔn kɔmpilayt ɛn smɔl CSS, JavaSkript, ɛn fɔnt dɛn. No doks ɔ ɔrijinal sɔs fayl dɛn nɔ de insay.
Sos Less, JavaSkript, ɛn font fayl dɛn, wit wi dɔkyumɛnt dɛn. Rikways wan Less kɔmpayla ɛn sɔm sɛtup.
Bootstrap bin port frɔm Less to Sass fɔ mek i izi fɔ put insay Rails, Compass, ɔ Sass-onli prɔjek dɛn.
Di pipul dɛn ova na jsDelivr graciously gi CDN sɔpɔt fɔ Bootstrap in CSS ɛn JavaSkript. Jɔs yuz dɛn Bootstrap CDN link dɛn ya.
Yu kin instɔl ɛn manej Bootstrap in Less, CSS, JavaSkript, ɛn font dɛn bak we yu de yuz Bower :
Yu kin instɔl Bootstrap bak yuz npm :
require('bootstrap')
go lod ɔl di Bootstrap in jQuery plɔgin dɛn pan di jQuery ɔbjɛkt. Di bootstrap
modul insɛf nɔ de ɛkspɔt ɛnitin. Yu kin lod Bootstrap in jQuery plɔgin dɛn wan bay wan bay we yu lod di /js/*.js
fayl dɛn ɔnda di pakej in tɔp-lɛvel dairektrɔ.
Bootstrap's package.json
gɛt sɔm ɔda mɛtadata ɔnda dɛn ki dɛn ya:
less
- pat to Bootstrap in men Less sɔs faylstyle
- pat to Bootstrap in nɔ-minifayd CSS we dɛn dɔn prɛkompayl yuz di difɔlt sɛtin dɛn (nɔ kɔstɔmayshɔn)Yu kin instɔl ɛn manej Bootstrap in Less, CSS, JavaSkript, ɛn font dɛn bak we yu de yuz Composer :
Bootstrap de yuz Autoprefixer fɔ dil wit CSS vendor prɛfiks dɛn . If yu de kɔmpilayt Bootstrap frɔm in Less/Sass sɔs ɛn yu nɔ de yuz wi Gruntfayl, yu go nid fɔ intagret Autoprefixer insay yu bil prɔses yusɛf. If yu de yuz Bootstrap we dɛn dɔn kɔmpilayt bifo tɛm ɔ yu de yuz wi Gruntfayl, yu nɔ nid fɔ wɔri bɔt dis bikɔs Ɔtoprɛfiksa dɔn ɔlrɛdi intagret insay wi Gruntfayl.
Bootstrap na tu we dɛn kin dawnlod, insay we yu go si di dairektrɔ ɛn fayl dɛn we de dɔŋ ya, we de grup kɔmɔn risɔs dɛn we gɛt lɔjik wan ɛn we de gi ɔl tu di difrɛns dɛn we dɛn dɔn kɔmpilayt ɛn we dɛn dɔn smɔl.
Duya mɛmba se ɔl di JavaSkript plɔgin dɛn nid fɔ de insay jQuery, lɛk aw dɛn sho na di stata tɛmplat . Kɔnsul wibower.json
fɔ si us vɛshɔn dɛn fɔ jQuery dɛn de sɔpɔt.
We yu dɔn dawnlod am, pul di kɔmprɛs fɔlda fɔ si di strɔkchɔ fɔ (di kɔmpilayt) Bootstrap. Yu go si sɔntin lɛk dis:
Dis na di mɔs besik fɔm fɔ Bootstrap: prɛkompayl fayl dɛn fɔ kwik drɔp-in yuz insay klos to ɛni wɛb prɔjek. Wi de gi kɔmpilayt CSS ɛn JS ( bootstrap.*
), ɛn bak kɔmpilayt ɛn minifyed CSS ɛn JS ( bootstrap.min.*
). CSS sɔs map dɛn ( bootstrap.*.map
) de fɔ yuz wit sɔm brɔuza dɛn divɛlɔpa tul dɛn. Fɔnt dɛn frɔm Glyphicons de insay, ɛn di opshɔnal Bootstrap tim de insay.
Di Bootstrap sɔs kɔd dawlod gɛt di CSS, JavaSkript, ɛn font ɛset dɛn we dɛn dɔn kɔmpilayt bifo tɛm, wit sɔs Less, JavaSkript, ɛn dɔkyumentri. Fɔ tɔk mɔ, i gɛt dɛn tin ya ɛn ɔda tin dɛn:
Di less/
, js/
, ɛn fonts/
na di sɔs kɔd fɔ wi CSS, JS, ɛn aykɔn fɔnt dɛn (rispektiv wan). Di dist/
fɔlda gɛt ɔltin we de na di say we dɛn dɔn pul bifo tɛm fɔ dawnlod ɔp. Di docs/
fɔlda gɛt di sɔs kɔd fɔ wi dɔkyumentri, ɛn examples/
fɔ Bootstrap yuz. Bifo dat, ɛni ɔda fayl we de insay de gi sɔpɔt fɔ pakej dɛn, laysens infɔmeshɔn, ɛn divɛlɔpmɛnt.
Bootstrap de yuz Grunt fɔ in bil sistɛm, wit kɔvinant we fɔ wok wit di fremwɔk. Na aw wi de kɔmpilayt wi kɔd, rɔn tɛst, ɛn ɔda tin dɛn.
Fɔ instɔl Grunt, yu fɔ fɔs dawnlod ɛn instɔl node.js (we gɛt npm). npm tinap fɔ node pak modul ɛn na wan we fɔ manej divɛlɔpmɛnt dipɛnsin dɛn tru node.js.
Dɔn, frɔm di kɔmand layn:grunt-cli
ɔlsay na di wɔl wit npm install -g grunt-cli
./bootstrap/
dairektrɔ, dɔn rɔn npm install
. npm go luk di package.json
fayl ɛn ɔtomɛtik instɔl di lokal dipɛnsin dɛn we nid we dɛn rayt de.We yu dɔn, yu go ebul fɔ rɔn di difrɛn Grunt kɔmand dɛn we dɛn gi yu frɔm di kɔmand layn.
grunt dist
(Jɔs kɔmpilayt CSS ɛn JavaSkript)Rijeneret di /dist/
dairektrɔ wit kɔmpilayt ɛn minifyed CSS ɛn JavaSkript fayl dɛn. As Bootstrap yuza, dis na nɔmal wan di kɔmand we yu want.
grunt watch
(Wach)Wach di Less sɔs fayl dɛn ɛn ɔtomɛtik wan de kɔmpilayt dɛn bak to CSS ɛnitɛm we yu sev chenj.
grunt test
(Rɔn tɛst dɛn)Rɔn JSHint ɛn rɔn di QUnit tɛst dɛn edlɛs insay PhantomJS .
grunt docs
(Bild & test di docs aset dɛn)Bil ɛn tɛst CSS, JavaSkript, ɛn ɔda prɔpati dɛn we dɛn kin yuz we dɛn de rɔn di dɔkyumentri lokal wan via bundle exec jekyll serve
.
grunt
(Bil absoliutli evritin en run tests)Kɔmpayl ɛn smɔl CSS ɛn JavaSkript, bil di dɔkyumentri wɛbsayt, rɔn di HTML5 valideta agens di dɔkyumɛnt dɛn, rijeneret di Kastɔmayz ɛset dɛn, ɛn ɔda tin dɛn. I nid fɔ mek Jekyll . Usually onli nid if yu de hack pan Bootstrap sef.
If yu gɛt prɔblɛm wit instɔleshɔn dipɛnsin ɔ rɔn Grunt kɔmand dɛn, fɔs dilit di /node_modules/
dairektrɔ we npm dɔn jenarayz. Dɔn, rirun npm install
.
Start wit dis besik HTML tɛmplat, ɔ chenj dɛn ɛgzampul ya . Wi op se yu go kɔstɔmayt wi tɛmplat ɛn ɛgzampul dɛn, ɛn adap dɛn fɔ fit wetin yu nid.
Kɔpi di HTML we de dɔŋ fɔ bigin wok wit wan smɔl Bootstrap dɔkyumɛnt.
Bil pan di besik tɛmplat we de ɔp wit Bootstrap in bɔku kɔmpɔnɛnt dɛn. Wi de ɛnkɔrej yu fɔ kɔstɔmayt ɛn adap Bootstrap fɔ fit yu wan wan prɔjek in nid dɛn.
Gɛt di sɔs kɔd fɔ ɛvri ɛgzampul we de dɔŋ ya bay we yu dawnlod di Bootstrap ripɔsitɔri . Yu kin fɛn ɛgzampul dɛn na di docs/examples/
dairektrɔ.
Krio wan kɔstɔm navbar wit jɔstifay link dɛn. Hed dɛn de ɔp! Nɔto tu Safari frenli.
Bootlint na di ɔfishal Bootstrap HTML linta tul. I de chɛk ɔtomɛtik fɔ sɔm kɔmɔn HTML mistek dɛn na wɛb pej dɛn we de yuz Bootstrap insay wan fayn "vanila" we. Vanilla Bootstrap in kɔmpɔnɛnt/widget dɛn nid dɛn pat dɛn na di DOM fɔ kɔnfɔm to sɔm strɔkchɔ dɛn. Bootlint de chɛk se instans dɛn fɔ Bootstrap kɔmpɔnɛnt dɛn gɛt kɔrɛkt-strɔkchɔ HTML. Tink bɔt fɔ ad Bootlint to yu Bootstrap wɛb divɛlɔpmɛnt tulchen so dat nɔbɔdi pan di kɔmɔn mistek dɛn nɔ go slo yu prɔjek in divɛlɔpmɛnt.
Stay ɔp to det bɔt di divɛlɔpmɛnt fɔ Bootstrap ɛn rich to di kɔmyuniti wit dɛn ɛp risɔs ya.
irc.freenode.net
sava, na di ##bootstrap chanɛl .twitter-bootstrap-3
.bootstrap
pan pakej dɛn we de chenj ɔ ad to di wok we Bootstrap de du we dɛn de sheb tru npm ɔ di sem kayn delivri mɛkanism dɛn fɔ mek dɛn ebul fɔ fɛn maksimal.Yu kin fala @getbootstrap bak na twita fɔ di laytst gɔsip ɛn fayn fayn myuzik vidio dɛn.
Bootstrap de adap yu pej dɛn fɔ difrɛn skrin saiz dɛn ɔtomɛtik wan. Na dis na aw fɔ disable dis ficha so dat yu pej go wok lɛk dis ɛgzampul we nɔ de ansa .
<meta>
we dɛn tɔk bɔt na di CSS docswidth
on di .container
fɔ ɛni grid taya wit wan singl wit, fɔ ɛgzampul width: 970px !important;
Mek shɔ se dis kam afta di difɔlt Bootstrap CSS. Yu kin opshɔnali avɔyd di !important
wit midia kwɛstyɔn ɔ sɔm sɛlɛktɔ-fu..col-xs-*
klas dɛn apat frɔm, ɔ insay di ples fɔ, di midul/big wan dɛn. Nɔ wɔri, di ɛkstra-smɔl divays grid de skel to ɔl di rizɔlt dɛn.Yu go stil nid Respond.js fɔ IE8 (bikɔs wi midia kwɛstyɔn dɛn stil de ɛn nid fɔ prosɛs dɛn). Dis de disable di "mobayl sayt" aspek dɛm fɔ Bootstrap.
Wi dɔn yuz dɛn step ya fɔ wan ɛgzampul. Rid in sɔs kɔd fɔ si di patikyula chenj dɛn we dɛn dɔn impruv.
Yu de luk fɔ muf frɔm wan ol vɛshɔn fɔ Bootstrap to v3.x? Chek wi maykreshɔn gayd .
Dɛn bil Bootstrap fɔ wok fayn fayn wan na di laytst dɛsktɔp ɛn mobayl brawza dɛn, we min se ol brawza dɛn kin sho difrɛn stayl dɛn, pan ɔl we dɛn kin wok fayn fayn wan, fɔ sɔm pat dɛn.
Speshali, wi de sɔpɔt di laytst vɛshɔn dɛn fɔ di brɔuza ɛn pletfɔm dɛn we de dɔŋ ya.
Ɔda brawza dɛn we de yuz di layt vɛshɔn fɔ WɛbKit, Blink, ɔ Gecko, ilɛksɛf na dairekt ɔ tru di pletfɔm in wɛb viu API, dɛn nɔ de sɔpɔt klia wan. Bɔt, Bootstrap fɔ (bɔku tɛm) sho ɛn wok kɔrɛkt wan na dɛn brawza dɛn ya bak. Dɛn dɔn gi mɔ patikyula sɔpɔt infɔmeshɔn dɔŋ ya.
Jɛnɛral wan, Bootstrap de sɔpɔt di laytst vɛshɔn dɛn fɔ ɛni men pletfɔm in difɔlt brawza dɛn. Notis se dɛn nɔ de sɔpɔt prɔksi brawza dɛn (lɛk Opera Mini, Opera Mobile in Turbo mod, UC Browser Mini, Amazon Silk).
Krɔm we dɛn kɔl Chrome | Fayafaks | Safari we dɛn kin yuz | |
---|---|---|---|
Andrɔyd | Dɛn sɔpɔt am | Dɛn sɔpɔt am | N/A fɔ di wan dɛn we de |
iOS we de na di wɔl | Dɛn sɔpɔt am | Dɛn sɔpɔt am | Dɛn sɔpɔt am |
Semweso, dɛn kin sɔpɔt di laytst vɛshɔn dɛn fɔ bɔku pan di dɛsktɔp brawza dɛn.
Krɔm we dɛn kɔl Chrome | Fayafaks | Intanɛt Ɛksplɔrɔ | Ɔpa we dɛn kɔl Opera | Safari we dɛn kin yuz | |
---|---|---|---|---|---|
Mac we dɛn kɔl Mac | Dɛn sɔpɔt am | Dɛn sɔpɔt am | N/A fɔ di wan dɛn we de | Dɛn sɔpɔt am | Dɛn sɔpɔt am |
Window dɛn | Dɛn sɔpɔt am | Dɛn sɔpɔt am | Dɛn sɔpɔt am | Dɛn sɔpɔt am | Nɔto sɔpɔt |
Na Windows, wi de sɔpɔt Intanɛt Ɛksplɔrɔ 8-11 .
Fɔ Fayafaks, apat frɔm di laytst nɔmal stebul rilis, wi de sɔpɔt bak di laytst Ɛkstend Sɔpɔt Rilis (ESR) vɛshɔn fɔ Fayafaks.
Nɔ ɔfishal wan, Bootstrap fɔ luk ɛn biev fayn fayn wan na Chromium ɛn Chrome fɔ Linux, Fayafaks fɔ Linux, ɛn Intanɛt Ɛksplɔrɔ 7, ɛn bak Maykrosoft Ɛj, pan ɔl we dɛn nɔ ɔfishal sɔpɔt dɛn.
Fɔ si sɔm pan di brɔwza bɔg dɛn we Bootstrap gɛt fɔ grap wit, si wi Wall of browser bugs .
Intanɛt Ɛksplɔrɔ 8 ɛn 9 dɛnsɛf de sɔpɔt, bɔt duya mɛmba se sɔm CSS3 prɔpati dɛn ɛn HTML5 ɛlimɛnt dɛn nɔ de sɔpɔt dɛn brɔuza dɛn ya ful wan. Apat frɔm dat, Intanɛt Ɛksplɔrɔ 8 nid fɔ yuz Respond.js fɔ mek yu ebul fɔ sɔpɔt midia kwɛstyɔn.
Tin | Intanɛt Ɛksplɔrɔ 8 | Intanɛt Ɛksplɔrɔ 9 |
---|---|---|
border-radius |
Nɔto sɔpɔt | Dɛn sɔpɔt am |
box-shadow |
Nɔto sɔpɔt | Dɛn sɔpɔt am |
transform |
Nɔto sɔpɔt | Sɔpɔt, wit -ms prɛfiks |
transition |
Nɔto sɔpɔt | |
placeholder |
Nɔto sɔpɔt |
Visit Can I use... fɔ di ditel dɛn bɔt di brawza sɔpɔt fɔ CSS3 ɛn HTML5 ficha dɛn.
Tek tɛm wit dɛn kɔvayt ya we yu de yuz Respond.js na yu divɛlɔpmɛnt ɛn prodakshɔn ɛnvayrɔmɛnt fɔ Intanɛt Ɛksplɔrɔ 8.
Yuz Respond.js wit CSS we dɛn ɔs pan difrɛn (sɔb)domɛyn (fɔ ɛgzampul, na CDN) nid sɔm ɔda sɛtup. Si di Respond.js docs fɔ di ditel dɛn.
file://
Bikɔs ɔf di brawza sikyɔriti lɔ dɛn, Respond.js nɔ de wok wit pej dɛn we dɛn de wach bay di file://
protɔkɔl (lɛk we yu de opin lokal HTML fayl). Fɔ tɛst di rispɔnsiv ficha dɛn na IE8, si yu pej dɛn oba HTTP(S). Si di Respond.js docs fɔ di ditel dɛn.
@import
Respond.js nɔ de wok wit CSS we dɛn rifer to via @import
. In patikyula, sɔm Drupal kɔnfigyushɔn dɛn we dɛn no fɔ yuz @import
. Si di Respond.js docs fɔ di ditel dɛn.
IE8 nɔ de sɔpɔt ful wan box-sizing: border-box;
we dɛn jɔyn am wit min-width
, max-width
, min-height
, ɔ max-height
. Fɔ da rizin de, as of v3.0.1, wi nɔ de yuz max-width
pan .container
s igen.
IE8 gɛt sɔm prɔblɛm dɛn wit @font-face
we dɛn jɔyn wit :before
. Bootstrap de yuz dat kɔmbaynshɔn wit in Glyphicons. If dɛn kech wan pej, ɛn lod am witout di maws oba di winda (dat na, hit di rifresh bɔtin ɔ lod sɔntin na iframe) den di pej go gɛt rɛnd bifo di font lod. If yu put yu an oba di pej (bɔdi) i go sho sɔm pan di aykɔn dɛn ɛn we yu put yu an oba di ɔda aykɔn dɛn, yu go sho dɛn wan dɛn de bak. Si issue #13863 fɔ di ditel dɛn.
Bootstrap nɔ de sɔpɔt insay di ol Intanɛt Ɛksplɔrɔ kɔmpatibiliti mɔd dɛn. Fɔ mek shɔ se yu de yuz di laytst rɛndamɛnt mɔd fɔ IE, tink bɔt fɔ put di rayt <meta>
tɛg na yu pej dɛn:
Kɔnfɛm di dɔkyumɛnt mɔd bay we yu opin di dibɔg tul dɛn: prɛs F12ɛn chɛk di "Dokumɛnt Mɔd".
Dis tag de insay ɔl di Bootstrap in dɔkyumentri ɛn ɛgzampul dɛn fɔ mek shɔ se di bɛst rɛnda we pɔsibul insay ɛni wan pan di wan dɛn we dɛn sɔpɔt fɔ Intanɛt Ɛksplɔrɔ.
Si dis StackOverflow kwɛstyɔn fɔ mɔ infɔmeshɔn.
Intanɛt Ɛksplɔrɔ 10 nɔ de difrɛns di divays wit frɔm di viupɔt wit , ɛn so i nɔ de yuz di midia kwɛstyɔn dɛn fayn fayn wan na Bootstrap in CSS. Nɔmal wan yu go jɔs ad wan kwik smɔl pat pan CSS fɔ fiks dis:
Bɔt dis nɔ de wok fɔ divays dɛn we de rɔn Windows Phone 8 vɛshɔn dɛn we ol pas Update 3 (aka GDR3) , bikɔs i de mek dɛn kayn divays dɛn de sho wan mɔst dɛsktɔp we de sho instead fɔ narrow "fon" we de sho. Fɔ adrɛs dis, yu go nid fɔ put di CSS ɛn JavaSkript dɛn we de dɔŋ ya fɔ wok arawnd di bɔg .
Fɔ no mɔ ɛn fɔ no aw fɔ yuz am, rid Windows Phone 8 ɛn Device-Width .
As a heads up, wi inklud dis insay ɔl di Bootstrap in dɔkyumentri ɛn ɛgzampul dɛn as demonstreshɔn.
Di rendering enjin fɔ di vɛshɔn dɛn fɔ Safari bifo v7.1 fɔ OS X ɛn Safari fɔ iOS v8.0 bin gɛt sɔm prɔblɛm wit di nɔmba fɔ di desimal ples dɛn we dɛn yuz na wi .col-*-1
grid klas dɛn. So if yu bin gɛt 12 wan wan grid kɔlɔm dɛn, yu go notis se dɛn kam shɔt we yu kɔmpia dɛn to ɔda row dɛn we gɛt kɔlɔm dɛn. Apat frɔm we yu de ɔpgrɛd Safari/iOS, yu gɛt sɔm opshɔn dɛn fɔ wok-arawnd:
.pull-right
to yu las grid kɔlɔm fɔ gɛt di had-rayt alaynɛshɔnSɔpɔt fɔ overflow: hidden
pan di <body>
ɛlimɛnt na kwik limited in iOS ɛn Andrɔyd. Fɔ du dat, we yu skrol pas di ɔp ɔ dɔŋ pan wan modal na ɛni wan pan dɛn divays dɛn brɔuza dɛn, di <body>
tin dɛn we de insay go bigin fɔ skrol. Si Chrome bɔg #175502 (dɛn dɔn fiks am na Chrome v40) ɛn WɛbKit bɔg #153852 .
As of iOS 9.3, we wan modal opin, if di fɔs tɔch fɔ wan skrol jes de insay di bɔda fɔ wan tɛkstual <input>
ɔ wan <textarea>
, di <body>
kɔntinyu we de ɔnda di modal go skrol instead ɔf di modal sɛf. Si WɛbKit bɔg #153856 .
Dɔn bak, notis se if yu de yuz fiks navbar ɔ yu de yuz input dɛn insay wan modal, iOS gɛt rɛnda bɔg we nɔ de ɔpdet di pozishɔn fɔ fiks ɛlimɛnt dɛn we dɛn trig di vayrɔyal kibɔd. Sɔm wok-arawnd fɔ dis inklud fɔ transfɔm yu ɛlimɛnt dɛn to position: absolute
ɔ kɔl wan tayma pan fɔs fɔ tray fɔ kɔrɛkt di pozishɔn wit yu an. Dis nɔto Bootstrap de handle am, so na yu fɔ disayd us sɔlvishɔn go fayn fɔ yu aplikeshɔn.
Di .dropdown-backdrop
elemɛnt nɔ de yuz pan iOS na di nav bikɔs ɔf di kɔmplisiti fɔ z-indeks. So, fɔ lɔk drɔpdɔwn dɛn na navbar dɛn, yu fɔ klik di drɔpdɔwn ɛlimɛnt dairekt wan (ɔ ɛni ɔda ɛlimɛnt we go faya klik ivin na iOS ).
Pej zum in nɔ go ebul fɔ avɔyd fɔ prɛzɛnt rɛnda artifakt dɛn na sɔm kɔmpɔnɛnt dɛn, ɔl tu na Bootstrap ɛn di ɔda pat na di wɛb. Dipen pan di prɔblɛm, wi kin ebul fɔ fiks am (luk fɔs ɛn opin wan prɔblɛm if nid de). Bɔt wi kin ignore dɛn wan ya as bɔku tɛm dɛn nɔ kin gɛt dairekt sɔlvishɔn ɔda pas hacky wokarawnd.
:hover
/ :focus
na mobaylIvin if rial hova nɔ pɔsibul pan bɔku tɔchskrin dɛn, bɔku mobayl brawza dɛn de ɛmulayt hov sɔpɔt ɛn mek :hover
"stika". In ɔda wɔd dɛn, :hover
stayl dɛn kin bigin fɔ aplay afta dɛn dɔn tap wan ɛlimɛnt ɛn dɛn kin jɔs stɔp fɔ aplay afta di pɔsin we de yuz am tap sɔm ɔda ɛlimɛnt. Dis kin mek Bootstrap in :hover
stet dɛn bi "stuck" we dɛn nɔ want pan dɛn kayn brawza dɛn de. Sɔm mobayl brawza dɛn bak kin mek :focus
di sem kayn stika. Naw, no simpul wok nɔ de fɔ sɔlv dɛn prɔblɛm ya pas fɔ pul dɛn kayn stayl dɛn de ɔltogɛda.
Ivin insay sɔm brɔuzhɔ dɛn tide, fɔ print kin mek pɔsin nɔ ebul fɔ du natin.
Na mɔtalman, as fɔ Chrome v32 ɛn ilɛksɛf na di margin sɛtin dɛn, Chrome de yuz wan viupɔt wit we rili smɔl pas di fizik pepa saiz we i de sɔlv midia kwɛstyɔn dɛn we i de print wɛb pej. Dis kin mek Bootstrap in ɛkstra-smɔl grid wok we dɛn nɔ bin de ɛkspɛkt we dɛn de print. Si isyu #12078 ɛn Chrome bɔg #273306 fɔ sɔm ditel dɛn. Di tin dɛn we dɛn dɔn tɔk bɔt fɔ sɔlv di prɔblɛm:
@screen-*
Less vɛriɔbul dɛn so dat dɛn go tek yu printa pepa as big pas ɛkstra-smɔl.Dɔn bak, as fɔ Safari v8.0, fiks-wid .container
s kin mek Safari yuz wan smɔl font saiz we nɔ kɔmɔn we i de print. Si #14868 ɛn WɛbKit bɔg #138192 fɔ mɔ ditel. Wan tin we pɔsin kin ebul fɔ du fɔ dis na fɔ ad di CSS we de dɔŋ ya:
Frɔm di bɔks, Andrɔyd 4.1 (ɛn ivin sɔm nyu rilis dɛn i tan lɛk) de ship wit di Brawza ap as di difɔlt wɛb brawza we yu pik (we difrɛn frɔm Chrome). I sɔri fɔ no se di Brawza ap gɛt bɔku bɔg ɛn tin dɛn we nɔ gri wit CSS in jɔnaral.
Na <select>
ɛlimɛnt dɛn, di Andrɔyd stok brawza nɔ go sho di sayd kɔntrol dɛn if wan border-radius
ɛn/ɔ border
dɛn dɔn yuz am. (Luk dis StackOverflow kwɛstyɔn fɔ di ditel dɛn.) Yuz di smɔl pat pan di kɔd we de dɔŋ fɔ pul di CSS we de mek yu vɛks ɛn rɛnd di<select>
as wan ɛlimɛnt we nɔ gɛt stayl na di Andrɔyd stok brawza. Di yuz ɛjɛn we de snɛf de avɔyd fɔ ambɔg Chrome, Safari, ɛn Mozilla brawza dɛn.
Yu want fɔ si ɛgzampul? Chek out dis JS Bin demo.
Fɔ mek dɛn ebul fɔ gi di bɛst ɛkspiriɛns to ol ɛn bɔg brawza dɛn, Bootstrap de yuz CSS brawza hack dɛn na sɔm ples dɛn fɔ tɔch spɛshal CSS to sɔm brawza vɛshɔn dɛn fɔ mek dɛn ebul fɔ wok arawnd bɔg dɛn na di brawza dɛnsɛf. Wi ɔndastandin se dɛn hack ya kin mek CSS validators kɔmplen se dɛn nɔ valid. Insay wan tu ples, wi de yuz bak blɔd-ɛj CSS ficha dɛn we nɔ ful-ɔp yet fɔ standad, bɔt dɛn de yuz dɛn wan ya jɔs fɔ mek dɛn go bifo mɔ ɛn mɔ.
Dɛn validɛshɔn wɔnin ya nɔ impɔtant na prɔsis bikɔs di pat we nɔ gɛt haki na wi CSS de fulɔp fɔ validet ɛn di haki pat dɛn nɔ de ambɔg di rayt we fɔ wok we di pat we nɔ haki de du, na dat mek wi nɔ de tek tɛm du dɛn patikyula wɔnin ya.
Wi HTML dɔk dɛn sɛf gɛt sɔm tin dɛn we nɔ impɔtant ɛn we nɔ impɔtant HTML validɛshɔn wɔnin dɛn bikɔs wi put wan wok-arawnd fɔ wan patikyula Fayafaks bɔg .
Pan ɔl we wi nɔ de ɔfishal wan sɔpɔt ɛni tɔd pati plɔgin ɔ ad-ɔn, wi de gi sɔm fayn advays dɛn fɔ ɛp fɔ avɔyd prɔblɛm dɛn we kin apin na yu prɔjek dɛn.
Sɔm tɔd pati softwe, lɛk Google Maps ɛn Google Custom Search Engine, de agens Bootstrap bikɔs ɔf * { box-sizing: border-box; }
, wan lɔ we de mek i bi so padding
nɔ de afɛkt di fayn kɔmpyut wit fɔ wan ɛlimɛnt. Lan mɔ bɔt bɔks mɔdel ɛn sayzin na CSS Tricks .
Dipen pan di kɔntɛks, yu kin ɔvalayz as-nid (Opshɔn 1) ɔ riset di bɔks-sayz fɔ ɔl di rijyɔn dɛn (Opshɔn 2).
Bootstrap de fala di kɔmɔn wɛb standad dɛn ɛn—wit smɔl ɛkstra ɛfɔt—dɛn kin yuz am fɔ mek sayt dɛn we di wan dɛn we de yuz AT go ebul fɔ yuz .
If yu nevigishɔn gɛt bɔku link dɛn ɛn i kam bifo di men tin dɛn we de na di DOM, ad wan Skip to main content
link bifo di nevigishɔn (fɔ simpul ɛksplen, si dis A11Y Projɛkt atikul bɔt skip nevigishɔn link dɛn ). If yu yuz di .sr-only
klas, i go ayd di skip link wit yu yay, ɛn di .sr-only-focusable
klas go mek shɔ se di link de sho wans yu dɔn fɔs (fɔ di wan dɛn we de yuz di kibɔd we de si tin).
Bikɔs ɔf di shɔtkɔm/bɔg dɛn we dɔn de fɔ lɔng tɛm na Chrome (luk isyu 262171 na di Chromium bɔg traka ) ɛn Intanɛt Ɛksplɔrɔ (luk dis atikul bɔt in-pej link dɛn ɛn fɔs ɔda ), yu go nid fɔ mek shɔ se di target fɔ yu skip link na at least programmatically focusable bay we dɛn ad tabindex="-1"
.
Apat frɔm dat, yu kin want fɔ klia wan fɔ stɔp wan visible fɔs indikashɔn pan di target (patikula as Chrome naw de sɛt fɔs bak pan ɛlimɛnt dɛn wit tabindex="-1"
we dɛn klik dɛn wit di maws) wit #content:focus { outline: none; }
.
Notis se dis bɔg go afɛkt ɛni ɔda link we de insay di pej bak we yu sayt go de yuz, ɛn dis go mek di wan dɛn we de yuz kibɔd nɔ gɛt wan yus. Yu kin tink bɔt fɔ ad wan sem kayn stɔp-gap fiks to ɔl di ɔda nem ankɔ / fragmɛnt aydentifaya dɛn we de wok lɛk link target.
We yu de nest ɛd dɛn ( <h1>
- <h6>
), yu praymari dɔkyumɛnt hεda fɔ bi wan <h1>
. Di edlayn dɛn we de kam afta dat fɔ mek lɔjik yus fɔ <h2>
- <h6>
so dat di wan dɛn we de rid di skrin go ebul fɔ bil wan tebul we gɛt tin dɛn fɔ yu pej dɛn.
Lan mɔ na HTML CodeSniffer ɛn Penn State in AksesAbiliti .
Naw, sɔm pan di difɔlt kɔlɔ kɔmbaynshɔn dɛn we de na Bootstrap (lɛk di difrɛn stayl bɔtin klas dɛn, sɔm pan di kɔd dɛn we de aylayt kɔlɔ dɛn we dɛn kin yuz fɔ di bɛsik kɔd blɔk dɛn , di .bg-primary
kɔntɛkstual bakgrɔn ɛlda klas, ɛn di difɔlt link kɔlɔ we dɛn yuz pan wayt bakgrɔn) gɛt smɔl kɔntrast rεshɔn (dεn dכn rεkomεnd rεshכ we na 4.5: 1 ). Dis kin mek prɔblɛm to di wan dɛn we de yuz am we nɔ de si fayn ɔ we nɔ gɛt kɔlɔ. Dɛn difɔlt kɔlɔ dɛn ya kin nid fɔ chenj fɔ mek dɛn difrɛn ɛn fɔ mek dɛn ebul fɔ rid dɛn mɔ.
Bootstrap de rilis ɔnda di MIT laysens ɛn na kɔpirayt 2016 Twitter. We dɛn bɔyl am to smɔl smɔl pat dɛn, dɛn kin diskrayb am wit di kɔndishɔn dɛn we de dɔŋ ya.
Di ful Bootstrap laysens de na di prɔjek ripɔsitɔri fɔ mɔ infɔmeshɔn.
Di kɔmyuniti mɛmba dɛn dɔn translet di dɔkyumɛnt dɛn we Bootstrap gɛt insay difrɛn langwej dɛn. Nɔn nɔ de we ɔfishal sɔpɔt ɛn dɛn nɔ kin de ɔltɛm.
Wi nɔ de ɛp fɔ ɔganayz ɔ ɔs di transleshɔn dɛn, wi jɔs de link to dɛn.
Yu dɔn dɔn fɔ translet nyu ɔ bɛtɛ transleshɔn? Opin wan pul riŋwe fɔ ad am to wi list.