Kutanga
Mhedziso yeBootstrap, maitiro ekurodha nekushandisa, ekutanga matemplate uye mienzaniso, nezvimwe.
Mhedziso yeBootstrap, maitiro ekurodha nekushandisa, ekutanga matemplate uye mienzaniso, nezvimwe.
Bootstrap (ikozvino v3.3.7) ine nzira shomanana dziri nyore dzekukurumidza kutanga, imwe neimwe inofadza kune imwe nhanho yeunyanzvi uye kesi yekushandisa. Verenga kuti uone kuti chii chinokodzera zvaunoda.
Yakaunganidzwa uye yakagadziriswa CSS, JavaScript, uye mafonti. Hapana magwaro kana epakutanga mafaera anosanganisirwa.
Source Zvishoma, JavaScript, uye mafonti mafaera, pamwe nemagwaro edu. Inoda Yakaderera compiler uye kumwe kuseta.
Bootstrap inotakurwa kubva paZvishoma kuenda kuSass kuti inyore nyore muRails, Compass, kana maSass-chete mapurojekiti.
Ivo vanhu vari pajsDelivr nenyasha vanopa CDN rutsigiro rweBootstrap's CSS uye JavaScript. Ingoshandisa aya maBootstrap CDN link.
Iwe unogona zvakare kuisa nekugadzirisa Bootstrap's Zvishoma, CSS, JavaScript, uye mafonti uchishandisa Bower :
Iwe unogona zvakare kuisa Bootstrap uchishandisa npm :
require('bootstrap')
ichatakura ese Bootstrap's jQuery plugins pane jQuery chinhu. Iyo bootstrap
module pachayo haibudisi chero chinhu. Iwe unogona kurodha Bootstrap's jQuery plugins wega nekurodha mafaera /js/*.js
pasi pepakeji yepamusoro-level directory.
Bootstrap's package.json
ine imwezve metadata pasi pemakiyi anotevera:
less
- nzira yeBootstrap's main Les source filestyle
- nzira yeBootstrap's isina-minified CSS iyo yakagadziridzwa uchishandisa iyo default marongero (hapana kugadzirisa)Iwe unogona zvakare kuisa nekugadzirisa Bootstrap's Zvishoma, CSS, JavaScript, uye mafonti uchishandisa Composer :
Bootstrap inoshandisa Autoprefixer kubata neCSS mutengesi prefixes . Kana iwe uchigadzira Bootstrap kubva kune Yakaderera / Sass sosi uye usingashandise yedu Gruntfile, iwe unozofanirwa kubatanidza Autoprefixer mune yako yekuvaka maitiro iwe pachako. Kana uri kushandisa precompiled Bootstrap kana kushandisa yedu Gruntfile, haufanirwe kunetsekana neizvi nekuti Autoprefixer yakatobatanidzwa muGruntfile yedu.
Bootstrap inodhawunirodha mumhando mbiri, mukati mamuchawana anotevera madhairekitori uye mafaera, zvine musoro kuunganidza zviwanikwa zvakajairwa uye nekupa zvese zvakasanganiswa uye minified misiyano.
Ndapota cherechedza kuti JavaScript plugins yose inoda kuti jQuery ibatanidzwe, sezvakaratidzwa mukutanga template . Bvunza yedubower.json
kuti uone kuti ndedzipi shanduro dzejQuery dzinotsigirwa.
Kana yangodhawunirodha, sunungura iyo yakamanikidzwa folda kuti uone chimiro che (iyo yakaunganidzwa) Bootstrap. Iwe uchaona chimwe chinhu chakadai:
Iyi ndiyo inonyanya kukosha yeBootstrap: akafanorongedzerwa mafaera ekukurumidza kudonhedza-mukati kushandiswa munenge chero webhu purojekiti. Isu tinopa yakaunganidzwa CSS uye JS ( bootstrap.*
), pamwe neyakaunganidzwa uye minified CSS uye JS ( bootstrap.min.*
). Mamepu eCSS source ( bootstrap.*.map
) anowanikwa kuti ashandiswe nemamwe mabhurawuza ekuvandudza maturusi. Mafonti kubva kuGlyphicons anosanganisirwa, sezvakaita sarudzo yeBootstrap theme.
Iyo Bootstrap source kodhi yekurodha inosanganisira iyo yakafanorongwa CSS, JavaScript, uye font midziyo, pamwe nekwakabva Zvishoma, JavaScript, uye zvinyorwa. Kunyanya kunyanya, zvinosanganisira zvinotevera uye nezvimwe:
Iyo less/
, js/
, uye fonts/
ndiyo sosi kodhi yeCSS yedu, JS, uye icon mafonti (zvichienderana). Iyo dist/
folda inosanganisira zvese zvakanyorwa mu precompiled yekurodha chikamu pamusoro. Iyo docs/
folda inosanganisira iyo kodhi kodhi yezvinyorwa zvedu, uye examples/
zveBootstrap kushandiswa. Kupfuura izvozvo, chero imwe faira inosanganisirwa inopa rutsigiro rwepakeji, ruzivo rwerezinesi, uye kusimudzira.
Bootstrap inoshandisa Grunt kune yayo kuvaka sisitimu, ine nzira dziri nyore dzekushanda nehurongwa. Ndiwo magadzirirwo atinoita kodhi yedu, kumhanya bvunzo, nezvimwe.
Kuti uise Grunt, unofanira kutanga wadhawunirodha uye kuisa node.js (inosanganisira npm). npm inomirira node packaged modules uye inzira yekugadzirisa kutsamira kwebudiriro kuburikidza node.js.
Zvadaro, kubva pamutsetse wemirairo:grunt-cli
pasi rose ne npm install -g grunt-cli
./bootstrap/
dhairekitori, wobva wamhanya npm install
. npm inotarisa package.json
faira uye inoisa otomatiki inodiwa yemuno inotsamira yakanyorwa ipapo.Kana wapedza, iwe unokwanisa kumhanyisa akasiyana Grunt mirairo yakapihwa kubva kumutsara wekuraira.
grunt dist
(Ingo unganidza CSS uye JavaScript)Inogadzirisa dhairekitori /dist/
neakaunganidzwa uye akacheneswa CSS uye JavaScript mafaera. Semushandisi weBootstrap, uyu kazhinji ndiwo murairo waunoda.
grunt watch
(Tarisa)Inotarisa Mashoma sosi mafaera uye otozvidzosera kuCSS pese paunochengeta shanduko.
grunt test
(Mhanya bvunzo)Inomhanya JSHint uye inomhanyisa QUnit bvunzo isina musoro muPhantomJS .
grunt docs
(Gadzira uye edza zvinyorwa zvezvinhu)Inovaka uye bvunzo CSS, JavaScript, uye zvimwe zvinhu zvinoshandiswa pakumhanyisa zvinyorwa munharaunda kuburikidza ne bundle exec jekyll serve
.
grunt
(Vaka zvachose zvese uye mhanyisa bvunzo)Inounganidza uye inoderedza CSS neJavaScript, inovaka zvinyorwa zvewebhusaiti, inomhanyisa iyo HTML5 inosimbisa kupesana nemagwaro, inovandudza zvinhu zveCustomizer, nezvimwe. Inoda Jekyll . Kazhinji zvinongodiwa chete kana iwe uchibira paBootstrap pachayo.
Iwe ukasangana nematambudziko nekuisa zvinotsamira kana kumhanyisa Grunt mirairo, tanga wadzima /node_modules/
dhairekitori rinogadzirwa nenpm. Zvadaro, dzokorora npm install
.
Tanga neiyi yakakosha HTML template, kana shandura iyi mienzaniso . Tinovimba kuti muchagadzirisa matemplate edu nemienzaniso, muchiachinja kuti aenderane nezvido zvenyu.
Kopa iyo HTML pazasi kuti utange kushanda nediki Bootstrap gwaro.
Vaka pane iyo yakakosha template pamusoro neBootstrap yakawanda zvikamu. Tinokukurudzira kuti ugadzirise uye uchinje Bootstrap kuti ienderane nezvido zvepurojekiti yako wega.
Tora iyo kodhi kodhi yemuenzaniso wega wega pazasi nekurodha iyo Bootstrap repository . Mienzaniso inogona kuwanikwa docs/examples/
mudhairekitori.
Gadzira yakasarudzika navbar ine zvinonangwa zvinongedzo. Musoro! Kwete zvakare Safari hushamwari.
Bootlint ndiyo yepamutemo Bootstrap HTML linter chishandiso. Iyo inongotarisa kune akati wandei akajairwa HTML zvikanganiso mumapeji ewebhu ari kushandisa Bootstrap nenzira yakanaka "vanilla". Vanilla Bootstrap's components/widgets inoda kuti zvikamu zvadzo zveDOM zvienderane nezvimwe zvimiro. Bootlint anotarisa kuti zviitiko zveBootstrap zvikamu zvine HTML-yakarongeka. Funga kuwedzera Bootlint kune yako Bootstrap webhu yekuvandudza toolchain kuitira kuti pasave nekamwe kakanganiso kakajairwa kunonotsa budiriro yepurojekiti yako.
Gara uchiziva nezvekuvandudzwa kweBootstrap uye svika kune nharaunda nezvinhu zvinobatsira izvi.
irc.freenode.net
museva, mu ##bootstrap chiteshi .twitter-bootstrap-3
.bootstrap
pamapakeji anoshandura kana kuwedzera kune mashandiro eBootstrap kana achigovera kuburikidza nenpm kana nzira dzekutumira dzakafanana dzekuwanikwa kwakanyanya.Iwe unogona zvakare kutevera @getbootstrap pa Twitter kune azvino makuhwa uye anotyisa emimhanzi mavhidhiyo.
Bootstrap inogadzirisa otomatiki mapeji ako akasiyana siyana skrini. Heano maitiro ekudzima chimiro ichi kuti peji rako rishande semuenzaniso uyu usingapindure .
<meta>
inotaurwa muCSS docswidth
pane .container
yega yega grid tier ine hupamhi humwe, semuenzaniso width: 970px !important;
Iva nechokwadi chekuti izvi zvinouya mushure meiyo default Bootstrap CSS. Iwe unogona kusarudza kudzivirira iyo !important
nemibvunzo midhiya kana imwe yekusarudza-fu..col-xs-*
makirasi mukuwedzera, kana panzvimbo, ari epakati/akakura. Usanetseke, iyo yakawedzera-diki mudziyo gidhi zviyero kune zvese zvinogadziriswa.Iwe uchiri kuda Respond.js yeIE8 (sezvo yedu midhiya mibvunzo ichiripo uye inoda kugadziriswa). Izvi zvinodzima "nharembozha saiti" zvikamu zveBootstrap.
Isu takashandisa matanho aya kumuenzaniso. Verenga kodhi yaro kuti uone shanduko dzakaitwa.
Kutsvaga kutama kubva kune yekare vhezheni yeBootstrap kuenda kuv3.x ? Tarisa gwara redu rekutama .
Bootstrap yakavakirwa kuti ishande zvakanyanya mudesktop yazvino uye nharembozha, zvichireva kuti mabhurawuza echikuru anogona kuratidza akasiyana masitaera, asi achishanda zvizere, kupa kwezvimwe zvikamu.
Kunyanya, isu tinotsigira shanduro dzichangoburwa dzemabhurawuza uye mapuratifomu anotevera.
Mamwe mabhurawuza anoshandisa yazvino vhezheni yeWebKit, Blink, kana Gecko, ingave yakananga kana kuburikidza neyepuratifomu yewebhu yekuona API, haina kutsigirwa zvakajeka. Nekudaro, Bootstrap inofanirwa (munguva zhinji) kuratidza uye kushanda nemazvo mumabhurawuza aya zvakare. Ruzivo rwakawanda rwerutsigiro rwunopihwa pazasi.
Kazhinji kutaura, Bootstrap inotsigira ichangoburwa vhezheni yega yega hombe yepuratifomu mabhurawuza. Ziva kuti mabhurawuza (akadai seOpera Mini, Opera Mobile's Turbo modhi, UC Browser Mini, Amazon Silk) haatsigirwe.
Chrome | Firefox | Safari | |
---|---|---|---|
Android | Inotsigirwa | Inotsigirwa | N/A |
iOS | Inotsigirwa | Inotsigirwa | Inotsigirwa |
Saizvozvo, ichangoburwa vhezheni yeakawanda desktop browser anotsigirwa.
Chrome | Firefox | Internet Explorer | Opera | Safari | |
---|---|---|---|---|---|
Mac | Inotsigirwa | Inotsigirwa | N/A | Inotsigirwa | Inotsigirwa |
Windows | Inotsigirwa | Inotsigirwa | Inotsigirwa | Inotsigirwa | Haisi kutsigirwa |
PaWindows, tinotsigira Internet Explorer 8-11 .
YeFirefox, mukuwedzera kune yazvino yakajairwa kuburitswa, isu tinotsigirawo yazvino Yakawedzerwa Rutsigiro Kuburitswa (ESR) vhezheni yeFirefox.
Zvisina pamutemo, Bootstrap inofanirwa kutarisa uye kuzvibata zvakanaka muChromium uye Chrome yeLinux, Firefox yeLinux, uye Internet Explorer 7, pamwe neMicrosoft Edge, kunyangwe isingatsigirwe zviri pamutemo.
Kuti uwane runyoro rwemamwe mabhurawuza ebhurawuza ayo Bootstrap anofanirwa kugadzirisa nawo, ona yedu Wall yebrowser bugs .
Internet Explorer 8 ne 9 inotsigirwawo, zvisinei, ndapota ziva kuti zvimwe zvivakwa zveCSS3 neHTML5 zvinhu hazvitsigirwe zvizere nemabhurawuza aya. Pamusoro pezvo, Internet Explorer 8 inoda kushandiswa kweRespond.js kugonesa rutsigiro rwemubvunzo wenhau.
Feature | Internet Explorer 8 | Internet Explorer 9 |
---|---|---|
border-radius |
Haisi kutsigirwa | Inotsigirwa |
box-shadow |
Haisi kutsigirwa | Inotsigirwa |
transform |
Haisi kutsigirwa | Inotsigirwa, ine -ms chivakashure |
transition |
Haisi kutsigirwa | |
placeholder |
Haisi kutsigirwa |
Shanyira Ndingashandisa... kune ruzivo rwerutsigiro rwebrowser yeCSS3 uye HTML5 maficha.
Ngwarira macaveats anotevera paunenge uchishandisa Respond.js mune yako budiriro uye kugadzirwa kwenzvimbo yeInternet Explorer 8.
Kushandisa Respond.js neCSS inobatwa pane imwe (sub)domain (somuenzaniso, paCDN) inoda kumwe kuseta. Ona Respond.js docs kuti uwane ruzivo.
file://
Nekuda kwemitemo yekuchengetedza yebrowser, Respond.js haishande nemapeji anotariswa kuburikidza file://
neprotocol (senge pakuvhura faira remunharaunda reHTML). Kuti uedze maficha anopindura muIE8, tarisa mapeji ako pamusoro peHTTP(S). Ona Respond.js docs kuti uwane ruzivo.
@import
Respond.js haishande neCSS iyo inoratidzwa kuburikidza ne @import
. Kunyanya, mamwe maDrupal masisitimu anozivikanwa kushandisa @import
. Ona Respond.js docs kuti uwane ruzivo.
IE8 haitsigire zvizere box-sizing: border-box;
kana yasanganiswa ne min-width
, max-width
, min-height
, kana max-height
. max-width
Nechikonzero ichocho , sev3.0.1, hatichashandisi pas .container
.
IE8 ine dzimwe nyaya nazvo @font-face
kana yasanganiswa ne :before
. Bootstrap inoshandisa iyo musanganiswa nemaGlyphicons ayo. Kana peji yakavharirwa, uye yakatakurwa pasina mbeva pamusoro pehwindo (kureva rova bhatani re refresh kana kurodha chimwe chinhu muiframe) ipapo peji rinopihwa risati ratakura mafonti. Kutenderera pamusoro peji (muviri) kunoratidza zvimwe zvidhori uye kutenderera pamusoro pezvidhori zvakasara zvicharatidza izvo zvakare. Ona chinyorwa #13863 kuti uwane ruzivo.
Bootstrap haitsigirwe mumamodhi ekare eInternet Explorer anoenderana. Kuti uve nechokwadi chekuti uri kushandisa yazvino revering mode yeIE, funga kusanganisa <meta>
tag yakakodzera mumapeji ako:
Simbisa iyo gwaro modhi nekuvhura maturusi ekugadzirisa: dzvanya F12uye tarisa iyo "Document Mode".
Iyi tegi inosanganisirwa mune ese eBootstrap's zvinyorwa uye mienzaniso kuve nechokwadi chakanakisa kupa chinogoneka mune yega yega inotsigirwa vhezheni yeInternet Explorer.
Ona uyu mubvunzo weStackOverflow kuti uwane rumwe ruzivo.
Internet Explorer 10 haisiyanise hupamhi hwechishandiso kubva pahupamhi hwekutarisa , uye nekudaro haishandise zvakanaka mibvunzo yenhau muBootstrap's CSS. Kazhinji unongowedzera snippet yekukurumidza yeCSS kugadzirisa izvi:
Zvisinei, izvi hazvishandi kune zvishandiso zvinoshandisa Windows Phone 8 shanduro dzekare pane Update 3 (aka GDR3) , sezvo zvichiita kuti michina yakadaro iratidze maonero edesktop zvakanyanya pane kutarisa "foni" yakamanikana. Kuti ugadzirise izvi, unozofanirwa kusanganisira inotevera CSS neJavaScript kuti ushande uchitenderedza bug .
Kuti uwane rumwe ruzivo uye nhungamiro yekushandisa, verenga Windows Phone 8 uye Device-Width .
Semusoro, isu tinosanganisira izvi mune zvese zvinyorwa zveBootstrap uye mienzaniso sekuratidzira.
Injini yekupa shanduro yeSafari isati yasvika v7.1 yeOS X uye Safari yeIOS v8.0 yaive nedambudziko nehuwandu hwenzvimbo dzinoshandiswa mumakirasi edu .col-*-1
egridi. Saka kana iwe uine gumi nemaviri magidhi makoramu, unoona kuti auya ari mapfupi kana achienzaniswa nemimwe mitsara yemakoramu. Kunze kwekusimudzira Safari/iOS, une dzimwe sarudzo dzekushanda:
.pull-right
kune yako yekupedzisira grid column kuti uwane iyo yakaoma-kurudyi kurongekaTsigiro yechinhu overflow: hidden
pane <body>
inogumira muIOS uye Android. Kuti izvozvo zviitike, kana iwe ukapfuura nepamusoro kana pasi pe modal mune chero yeaya mabhurawuza emidziyo, <body>
zvirimo zvinotanga kupururudza. Ona Chrome bug #175502 (yakagadziriswa muChrome v40) uye WebKit bug #153852 .
Kubva paIOS 9.3, nepo modal yakavhurika, kana kubata kwekutanga kwechimiro chemupumburu chiri mukati memuganho wezvinyorwa <input>
kana a <textarea>
, <body>
zviri pasi peiyo modal zvichapepetwa pachinzvimbo cheiyo modal pachayo. Ona WebKit bug #153856 .
Zvakare, cherechedza kuti kana iwe uri kushandisa yakagadziriswa navbar kana kushandisa mapimendi mukati me modal, iOS ine rendering bug iyo isingagadzirise nzvimbo yezvinhu zvakagadziriswa kana iyo chaiyo kiyibhodhi yatanga. Mamwe mashoma ekugadzirisa izvi anosanganisira kushandura zvinhu zvako kuita position: absolute
kana kudaidza timer pakutarisa kuyedza kugadzirisa mamiriro nemawoko. Izvi hazvibatike neBootstrap, saka zviri kwauri kuti usarudze kuti ndeipi mhinduro yakanakira application yako.
Chinhu .dropdown-backdrop
chacho hachishandiswe paIOS mune nav nekuda kwekuoma kwez-indexing. Saka, kuvhara kudonhedza mumabhawa, iwe unofanirwa kudzvanya zvakananga chinhu chinodonha (kana chero chimwe chinhu chinopisa chiitiko chekudzvanya mu iOS ).
Kufembera kwepeji kunopa zvisingadzivisiki kupa zvigadzirwa mune zvimwe zvikamu, zvese muBootstrap uye newebhu yese. Zvichienderana nenyaya, tinogona kuzvigadzirisa (tsvaga kutanga uye wozovhura nyaya kana zvichidikanwa). Nekudaro, isu tinowanzo kufuratira izvi sezvo ivo kazhinji vasina mhinduro yakananga kunze kwehacky workaround.
:hover
/ :focus
pane mobileKunyangwe kutenderera chaiko kusingagoneke pamazhinji touchscreens, mazhinji mabhurawuza enhare anotevedzera hovering rutsigiro uye kuita :hover
"kunamira". Mune mamwe mazwi, :hover
masitaera anotanga kushanda mushure mekutapa chinhu uye anongomira kushandisa mushure mekunge mushandisi atora chimwe chinhu. Izvi zvinogona kukonzera kuti :hover
nyika dzeBootstrap dzisade "kunamira" pamabhurawuza akadaro. Mamwe mabrowser enhare anoitawo :focus
zvakafanana. Ikozvino hapana nyore workaround yenyaya idzi kunze kwekubvisa masitaera akadaro zvachose.
Kunyangwe mune mamwe mabhurawuza emazuva ano, kudhinda kunogona kuve kwakaoma.
Kunyanya, seyeChrome v32 uye zvisinei nemarongerwo emargin, Chrome inoshandisa hupamhi hwekutarisa hwakatetepa kupfuura saizi yebepa remuviri kana uchigadzirisa midhiya mibvunzo uchidhinda peji rewebhu. Izvi zvinogona kuita kuti gidhi reBootstrap riwedzere-diki riitwe zvisingatarisirwi kana richidhinda. Ona chinyorwa #12078 uye Chrome bug #273306 kuti uwane mamwe mashoko. Mazano ekugadzirisa:
@screen-*
kweZvishoma zvinosiyana kuitira kuti printa yako ionekwe yakakura pane yakawedzera-diki.Zvakare, seyeSafari v8.0, yakatarwa-hupamhi .container
s inogona kukonzera Safari kushandisa saizi diki isingawanzo diki pakudhinda. Ona #14868 uye WebKit bug #138192 kuti uwane rumwe ruzivo. Imwe ingangoita workaround yeiyi kuwedzera inotevera CSS:
Kunze kwebhokisi, Android 4.1 (uye kunyangwe zvimwe zvitsva zvinoburitswa sezviri pachena) ngarava ine Browser app seye default web browser yesarudzo (kusiyana neChrome). Nehurombo, iyo Browser app ine akawanda mabhugi uye kusawirirana neCSS zvakazara.
Pane <select>
zvinhu, iyo Android stock browser haizoratidze iyo yedivi zvinodzora kana paine border-radius
uye / kana border
yakashandiswa. (Ona uyu mubvunzo weStackOverflow kuti uwane udzame.) Shandisa chidimbu chekodhi pazasi kuti ubvise CSS iri kugumbura uye ratidza <select>
sechinhu chisina kunyorwa paAndroid stock browser. Mushandisi anofemba anodzivirira kukanganiswa neChrome, Safari, uye Mozilla browser.
Unoda kuona muenzaniso? Tarisa uone iyi JS Bin demo.
Kuti ipe ruzivo rwepamusoro kune ekare uye mabhurawuza, Bootstrap inoshandisa CSS browser hacks munzvimbo dzinoverengeka kunanga yakakosha CSS kune dzimwe shanduro dzebrowser kuitira kuti ushande zvakatenderedza mabhugi mumabhurawuza pachawo. Aya hacks zvinonzwisisika anokonzera CSS validators kunyunyuta kuti haakodzeri. Munzvimbo dzakati wandei, isu tinoshandisawo kubuda ropa-kumucheto CSS maficha asati anyatso mira, asi aya anoshandiswa chete kufambira mberi.
Idzi yambiro dzekusimbisa hadzina basa mukuita sezvo iyo isiri-hacky chikamu cheCSS yedu ichinyatso simbisa uye zvikamu zvehacky hazvikanganise nekushanda kwakanaka kwechikamu chisiri chehacky, saka nei tichiregeredza nemaune yambiro idzi.
Mapepa edu eHTML anewo yambiro diki uye isingakoshesi yeHTML nekuda kwekubatanidzwa kwedu kwekugadzirisa kune imwe Firefox bug .
Kunyange isu tisingatsigire zviri pamutemo chero yechitatu bato maplugins kana ma-add-ons, isu tinopa mamwe mazano anobatsira kubatsira kudzivirira zvingangoitika mumapurojekiti ako.
Imwe yechitatu software, kusanganisira Google Mepu neGoogle Tsika Yekutsvagisa Injini, inopokana neBootstrap nekuda kwe * { box-sizing: border-box; }
, mutemo unoitisa kuti zvidaro padding
haukanganise iyo yekupedzisira computed upamhi hwechinhu. Dzidza zvakawanda nezve bhokisi modhi uye saizi paCSS Tricks .
Zvichienderana nemamiriro ezvinhu, unogona kudarika sezvinodiwa (Sarudzo 1) kana kuseta bhokisi-saizi yematunhu ese (Sarudzo 2).
Bootstrap inotevedzera zvakajairwa pawebhu zviyero uye-nekuda kwekuwedzera kushoma-inogona kushandiswa kugadzira mawebhusaiti anowanikwa kune avo vanoshandisa AT .
Kana kufamba kwako kuine zvakawanda zvinongedzo uye kunouya pamberi peiyo huru yemukati muDOM, wedzera Skip to main content
chinongedzo pamberi pekufamba (kuti uwane tsananguro iri nyore, ona ichi A11Y Project chinyorwa pane skip navigation links ). Kushandisa .sr-only
kirasi kunovanza skip link, uye .sr-only-focusable
kirasi ichaona kuti chinongedzo chinoonekwa kana chakanangana (kune vanoona vashandisi keyboard).
Nekuda kwekukanganisa kwenguva refu / tsikidzi muChrome (ona chinyorwa 262171 muChromium bug tracker ) uye Internet Explorer (ona chinyorwa ichi pa -in-peji zvinongedzo uye kurongeka kwekutarisa ), iwe uchafanirwa kuve nechokwadi chekuti chinangwa cheskip link yako. inotariswa nehurongwa nekuwedzera tabindex="-1"
.
Pamusoro pezvo, iwe ungangoda kudzvanya pachena chinongedzo chekutarisa pane icho chinangwa (kunyanya sezvo Chrome parizvino inoisawo kutarisa pazvinhu zvine tabindex="-1"
pazvinodzvanywa negonzo) ne #content:focus { outline: none; }
.
Ziva kuti iyi bug ichabata chero mamwe ma-in-peji malink angave ari kushandisa saiti yako, zvichiita kuti ashaye basa kune vashandisi vekhibhodi. Iwe unogona kufunga nezve kuwedzera yakafanana yekumira-gap gadziriso kune ese ane mazita anchors / fragment identifiers anoita senge link targets.
Kana uchigadzira misoro ( <h1>
- <h6>
), musoro wegwaro rako rekutanga unofanirwa kunge uri <h1>
. Misoro inotevera inofanira kushandisa zvine musoro <h2>
- <h6>
zvekuti vanoverenga skrini vanogona kugadzira tafura yezviri mukati yemapeji ako.
Dzidza zvakawanda paHTML CodeSniffer uye Penn State's AccessAbility .
Parizvino, mamwe eakasarudzika masanganiswa eruvara anowanikwa muBootstrap (akadai seakasiyana mabhatani makirasi makirasi, mamwe ekodhi anoratidza mavara anoshandiswa kune ekutanga kodhi mabhuroka , .bg-primary
mamiriro ekumashure emubatsiri kirasi, uye yakasarudzika yekubatanidza ruvara kana ichishandiswa pane chena kumashure) iva nereshiyo yakaderera yekusiyanisa (pasi peyeshiyo inokurudzirwa ye4.5:1 ). Izvi zvinogona kukonzera matambudziko kune vashandisi vane chiono chakaderera kana avo vasingaone ruvara. Aya mavara akasarudzika angangoda kugadziridzwa kuti awedzere mutsauko uye kutendeseka.
Bootstrap inoburitswa pasi peMIT rezinesi uye ndeye copyright 2016 Twitter. Yakabikwa kusvika kune zviduku zviduku, inogona kutsanangurwa nemamiriro anotevera.
Iyo yakazara Bootstrap rezenisi iri munzvimbo inochengeterwa purojekiti kuti uwane rumwe ruzivo.
Nhengo dzenharaunda dzakashandura zvinyorwa zveBootstrap mumitauro yakasiyana-siyana. Hapana anotsigirwa zviri pamutemo uye anogona kunge asiri enguva dzose.
Hatibatsire kuronga kana kugamuchira shanduro, tinongobatanidza nadzo.
Wapedza shanduro itsva kana iri nani? Vhura chikumbiro chekudhonza kuti uwedzere kune yedu runyorwa.