Ukuqalisa
Uhlolojikelele lwe-Bootstrap, indlela yokulanda nokusebenzisa, izifanekiso eziyisisekelo nezibonelo, nokuningi.
Uhlolojikelele lwe-Bootstrap, indlela yokulanda nokusebenzisa, izifanekiso eziyisisekelo nezibonelo, nokuningi.
I-Bootstrap (okwamanje i-v3.3.7) inezindlela ezimbalwa ezilula zokuqalisa ngokushesha, ngayinye iheha ileveli yekhono ehlukile kanye nekesi yokusebenzisa. Funda ukuze ubone ukuthi yini evumelana nezidingo zakho ezithile.
I-CSS ehlanganisiwe futhi yancishiswa, i-JavaScript, namafonti. Awekho amadokhumenti noma amafayela omthombo wangempela afakiwe.
Umthombo Okuncane, i-JavaScript, namafayela efonti, kanye namadokhumenti ethu. Idinga isihlanganisi Esincane kanye nokusetha okuthile.
I-Bootstrap ifakwe isuka e-Less iye kwa-Sass ukuze ifakwe kalula ku-Rails, Compass, noma amaphrojekthi we-Sass kuphela.
Abantu lapha e- jsDelivr bahlinzeka ngomusa ukusekelwa kwe-CDN kwe-CSS ye-Bootstrap ne-JavaScript. Vele usebenzise lezi zixhumanisi ze- Bootstrap CDN .
Ungaphinda ufake futhi uphathe Okuncane, i-CSS, iJavaScript, namafonti e-Bootstrap usebenzisa i- Bower :
Ungakwazi futhi ukufaka i-Bootstrap usebenzisa i -npm :
require('bootstrap')
izolayisha wonke ama-plugin e-Bootstrap e-jQuery entweni ye-jQuery. Imojula bootstrap
ngokwayo ayikhiphi lutho. Ungakwazi ukulayisha mathupha ama-plugin e-Bootstrap e-jQuery ngawodwana ngokulayisha /js/*.js
amafayela ngaphansi kohla lwemibhalo lwezinga eliphezulu lephakheji.
I-Bootstrap's package.json
iqukethe imethadatha eyengeziwe ngaphansi kokhiye abalandelayo:
less
- indlela eya kufayela eliyinhloko le-Bootstrap eliwumthombo omncanestyle
- indlela eya ku-CSS engancishisiwe ye-Bootstrap ehlanganiswe kusengaphambili kusetshenziswa izilungiselelo ezizenzakalelayo (akukho ukwenza ngokwezifiso)Ungaphinda ufake futhi uphathe Okuncane, i-CSS, i-JavaScript, namafonti e-Bootstrap usebenzisa i- Composer :
I -Bootstrap isebenzisa i -Autoprefixer ukuze ibhekane neziqalo zomthengisi we-CSS . Uma uhlanganisa i-Bootstrap emthonjeni wayo we-Less/Sass futhi ungasebenzisi i-Gruntfile yethu, uzodinga ukuhlanganisa i-Autoprefixer kunqubo yakho yokwakha ngokwakho. Uma usebenzisa i-Bootstrap ehlanganiswe ngaphambili noma usebenzisa i-Gruntfile yethu, awudingi ukukhathazeka ngalokhu ngoba i-Autoprefixer isivele ihlanganiswe ku-Gruntfile yethu.
I-Bootstrap ilayisheka ngezindlela ezimbili, lapho uzothola khona izinkomba namafayela alandelayo, uhlanganisa ngokunengqondo izinsiza ezivamile futhi unikeze kokubili ukuhluka okuhlanganisiwe nokucushiwe.
Sicela uqaphele ukuthi wonke ama-plugin e-JavaScript adinga ukuthi i-jQuery ifakwe, njengoba kuboniswe kusifanekiso sokuqala . Xhumana nathibower.json
ukuze ubone ukuthi yiziphi izinguqulo ze-jQuery ezisekelwayo.
Uma isilandiwe, vula unzip ifolda ecindezelwe ukuze ubone ukwakheka kwe-(i-Bootstrap ehlanganisiwe). Uzobona into efana nale:
Lolu uhlobo oluyisisekelo kakhulu lwe-Bootstrap: amafayela ahlanganiswe kusengaphambili ukuze asetshenziswe ngokushesha cishe kunoma iyiphi iphrojekthi yewebhu. Sihlinzeka nge-CSS ne-JS ( bootstrap.*
) ehlanganisiwe, kanye ne-CSS ne-JS ( bootstrap.min.*
). Amamephu omthombo we - CSS ( bootstrap.*.map
) ayatholakala ukuze asetshenziswe namathuluzi onjiniyela weziphequluli ezithile. Amafonti asuka ku-Glyphicons afakiwe, njengetimu ye-Bootstrap ekhethwayo.
Ukulanda ikhodi yomthombo we-Bootstrap kufaka phakathi i-CSS, i-JavaScript, nezimpahla zefonti esezihlanganiswe ngaphambili, kanye nomthombo othi Less, JavaScript, kanye nemibhalo. Ngokuqondile, kuhlanganisa okulandelayo nokunye okwengeziwe:
I- less/
, js/
, kanye fonts/
nekhodi yomthombo ye-CSS yethu, i-JS, namafonti esithonjana (ngokulandelana). Ifolda dist/
ihlanganisa konke okusohlwini lwesigaba sokudawuniloda esihlanganiswe ngaphambili ngenhla. Ifolda docs/
ihlanganisa ikhodi yomthombo yemibhalo yethu, kanye examples/
nokusetshenziswa kwe-Bootstrap. Ngaphandle kwalokho, noma yiliphi elinye ifayela elifakiwe linikeza ukwesekwa kwamaphakheji, ulwazi lwelayisense, nokuthuthukiswa.
I- Bootstrap isebenzisa i- Grunt kusistimu yayo yokwakha, enezindlela ezikahle zokusebenza ngohlaka. Kuyindlela esihlanganisa ngayo ikhodi yethu, senze izivivinyo, nokunye okwengeziwe.
Ukuze ufake i-Grunt, kufanele uqale ulande futhi ufake i-node.js (ehlanganisa i-npm). I-npm imele amamojula ahlanganisiwe we-node futhi iyindlela yokuphatha ukuncika kwentuthuko ngokusebenzisa i-node.js.
Bese, kusukela kulayini womyalo:grunt-cli
emhlabeni jikelele nge- npm install -g grunt-cli
./bootstrap/
, bese ugijima npm install
. i-npm izobheka package.json
ifayela futhi ifake ngokuzenzakalelayo ukuncika kwasendaweni okudingekayo okubalwe lapho.Uma usuqediwe, uzokwazi ukusebenzisa imiyalo ehlukahlukene ye-Grunt ehlinzekwe emugqeni womyalo.
grunt dist
(Vele uhlanganise i-CSS neJavaScript)Ikhiqiza kabusha /dist/
uhla lwemibhalo ngamafayela e-CSS ahlanganisiwe futhi ancishisiwe kanye ne-JavaScript. Njengomsebenzisi we-Bootstrap, lokhu kuvamise ukuba ngumyalo owufunayo.
grunt watch
(Buka)Ibuka amafayela omthombo Omncane futhi iwabuyisele ngokuzenzakalelayo ku-CSS noma nini lapho ulondoloza ushintsho.
grunt test
(Qalisa izivivinyo)Isebenzisa i- JSHint futhi iqalise ukuhlolwa kwe-QUnit ngaphandle kwekhanda ku- PhantomJS .
grunt docs
(Yakha futhi uhlole amafa amadokhumenti)Yakha futhi ihlole i-CSS, i-JavaScript, nezinye izimpahla ezisetshenziswa lapho kusetshenziswa amadokhumenti endaweni nge- bundle exec jekyll serve
.
grunt
(Yakha yonke into futhi wenze izivivinyo)Ihlanganisa futhi yenze ibe ncane i-CSS ne-JavaScript, yakha iwebhusayithi yemibhalo, isebenzisa isiqinisekisi se-HTML5 ngokumelene namadokhumenti, ivuselela izimpahla ze-Customizer, nokunye okwengeziwe. Idinga i- Jekyll . Ngokuvamile kudingekile kuphela uma ugebenga i-Bootstrap ngokwayo.
Uma kwenzeka uhlangabezana nezinkinga ngokufaka okuncikile noma ukusebenzisa imiyalo ye-Grunt, qala /node_modules/
ngokususa uhla lwemibhalo olukhiqizwe yi-npm. Bese, phinda npm install
.
Qala ngalesi sifanekiso se-HTML esiyisisekelo, noma lungisa lezi zibonelo . Sithemba ukuthi uzokwenza ngendlela oyifisayo izifanekiso nezibonelo zethu, uzivumelanise nezimo ukuze zivumelane nezidingo zakho.
Kopisha i-HTML engezansi ukuze uqale ukusebenza ngedokhumenti encane ye-Bootstrap.
Yakha kusifanekiso esiyisisekelo esingenhla ngezingxenye eziningi ze-Bootstrap. Sikukhuthaza ukuthi wenze ngendlela oyifisayo futhi uvumelanise i-Bootstrap ukuze ivumelane nezidingo zephrojekthi yakho ngayinye.
Thola ikhodi yomthombo yaso sonke isibonelo esingezansi ngokulanda inqolobane ye-Bootstrap . Izibonelo zingatholakala ohlwini docs/examples/
lwemibhalo.
Akukho lutho ngaphandle kwezisekelo: i-CSS ehlanganisiwe ne-JavaScript kanye nesiqukathi.
Isifanekiso esiyisisekelo esihle esifaka ibha ye-navbar nokunye okuqukethwe okwengeziwe.
Isakhiwo sebhulogi esilula samakholomu amabili esinokuzulazula kwangokwezifiso, unhlokweni, nohlobo.
Isakhiwo esiyisisekelo sedeshibhodi yomqondisi enebha eseceleni engashintshi kanye ne-navbar.
Isakhiwo sefomu ngokwezifiso kanye nomklamo wefomu lokungena ngemvume elilula.
Dala i-navbar yangokwezifiso enezixhumanisi ezifanele. Amakhanda phezulu! Ayihambisani kakhulu neSafari.
I- Bootlint iyithuluzi elisemthethweni le-Bootstrap HTML linter . Ihlola ngokuzenzakalela amaphutha amaningana ajwayelekile e-HTML emakhasini ewebhu asebenzisa i-Bootstrap ngendlela "ye-vanilla". Izingxenye/amawijethi e-Vanilla Bootstrap adinga izingxenye zawo ze-DOM ukuthi zivumelane nezakhiwo ezithile. I-Bootlint ihlola ukuthi izimo zezingxenye ze-Bootstrap zine-HTML eyakhiwe ngendlela efanele. Cabangela ukungeza i-Bootlint kuchungechunge lwakho lwamathuluzi okuthuthukisa iwebhu ye-Bootstrap ukuze kungabikho nelilodwa iphutha elivamile elibambezela ukuthuthukiswa kwephrojekthi yakho.
Hlala unolwazi lwakamuva mayelana nokuthuthukiswa kwe-Bootstrap futhi ufinyelele umphakathi ngalezi zinsiza eziwusizo.
irc.freenode.net
kuseva, esiteshini ##bootstrap .twitter-bootstrap-3
.bootstrap
kumaphakheji ashintsha noma engeza ekusebenzeni kwe-Bootstrap lapho esabalalisa nge- npm noma izindlela zokulethwa ezifanayo ukuze kutholakale okuphezulu.Ungakwazi futhi ukulandela u-@getbootstrap ku-Twitter ukuze uthole inhlebo yakamuva namavidiyo omculo amangalisayo.
I-Bootstrap ivumelanisa ngokuzenzakalelayo amakhasi akho amasayizi ahlukahlukene wesikrini. Nansi indlela yokukhubaza lesi sici ukuze ikhasi lakho lisebenze njengalesi sibonelo esingaphenduli .
<meta>
eshiwo kumadokhumenti e -CSSwidth
segridi .container
ngasinye ngobubanzi obubodwa, isibonelo width: 970px !important;
Qiniseka ukuthi lokhu kuza ngemva kwe-CSS ye-Bootstrap ezenzakalelayo. Ungakwazi ukugwema ngokuzikhethela !important
ngemibuzo yemidiya noma isikhethi-fu..col-xs-*
amakilasi ngaphezu, noma esikhundleni salezo ezimaphakathi/ezinkulu. Ungakhathazeki, igridi yedivayisi encane kakhulu ifinyelela kukho konke ukulungiswa.Usazodinga i-Respond.js ye-IE8 (njengoba imibuzo yethu yemidiya isekhona futhi idinga ukucutshungulwa). Lokhu kukhubaza izici "zesayithi yeselula" ze-Bootstrap.
Sisebenzise lezi zinyathelo esibonelweni. Funda ikhodi yayo yomthombo ukuze ubone izinguquko ezithile ezisetshenziswayo.
Ufuna ukuthutha usuka enguqulweni yakudala ye-Bootstrap uye ku-v3.x? Bheka umhlahlandlela wethu wokufuduka .
I-Bootstrap yakhelwe ukusebenza kahle kakhulu kwideskithophu yakamuva neziphequluli zeselula, okusho ukuthi iziphequluli ezindala zingase zibonise indlela ehlukile, nakuba zisebenza ngokugcwele, ukunikezwa kwezingxenye ezithile.
Ngokukhethekile, sisekela izinguqulo zakamuva zeziphequluli nezinkundla ezilandelayo.
Ezinye iziphequluli ezisebenzisa inguqulo yakamuva ye-WebKit, i-Blink, noma i-Gecko, kungaba ngokuqondile noma nge-API yokubuka iwebhu yesikhulumi, azisekelwa ngokusobala. Nokho, i-Bootstrap kufanele (ezikhathini eziningi) ibonise futhi isebenze kahle nakulezi ziphequluli. Ulwazi oluthe xaxa losekelo lunikezwe ngezansi.
Ngokuvamile, i-Bootstrap isekela izinguqulo zakamuva zeziphequluli ezizenzakalelayo zengxenyekazi ngayinye enkulu. Qaphela ukuthi iziphequluli zommeleli (ezifana ne-Opera Mini, imodi ye-Opera Mobile Turbo, i-UC Browser Mini, i-Amazon Silk) azisekelwe.
I-Chrome | IFirefox | Safari | |
---|---|---|---|
Android | Isekelwe | Isekelwe | N/A |
iOS | Isekelwe | Isekelwe | Isekelwe |
Ngokufanayo, izinguqulo zakamuva zeziphequluli eziningi zedeskithophu ziyasekelwa.
I-Chrome | IFirefox | I-Internet Explorer | I-Opera | Safari | |
---|---|---|---|---|---|
Mac | Isekelwe | Isekelwe | N/A | Isekelwe | Isekelwe |
IWindows | Isekelwe | Isekelwe | Isekelwe | Isekelwe | Ayisekelwe |
Ku-Windows, sisekela i-Internet Explorer 8-11 .
KuFirefox, ngaphezu kokukhishwa kwakamuva okuzinzile okujwayelekile, siphinde sisekele inguqulo yakamuva yokukhululwa kokusekelwa okunwetshiwe (ESR) yeFirefox.
Ngokungafanele, i-Bootstrap kufanele ibukeke futhi iziphathe kahle ngokwanele ku-Chromium ne-Chrome ye-Linux, i-Firefox ye-Linux, ne-Internet Explorer 7, kanye ne-Microsoft Edge, nakuba ingasekelwe ngokusemthethweni.
Ukuze uthole uhlu lwezinye iziphazamisi zesiphequluli i-Bootstrap okufanele ibhekane nazo, bheka i-Wall yethu yeziphazamisi zesiphequluli .
I-Internet Explorer 8 ne-9 nazo ziyasekelwa, nokho, sicela uqaphele ukuthi ezinye izici ze-CSS3 nezinto ze-HTML5 azisekelwa ngokugcwele yilezi ziphequluli. Ngaphezu kwalokho, i- Internet Explorer 8 idinga ukusetshenziswa kwe- Respond.js ukuze inike amandla ukusekelwa kwemibuzo yemidiya.
Isici | I-Internet Explorer 8 | I-Internet Explorer 9 |
---|---|---|
border-radius |
Ayisekelwe | Isekelwe |
box-shadow |
Ayisekelwe | Isekelwe |
transform |
Ayisekelwe | Isekelwe, -ms nesiqalo |
transition |
Ayisekelwe | |
placeholder |
Ayisekelwe |
Vakashela Can I use... ukuze uthole imininingwane yosekelo lwesiphequluli lwe-CSS3 kanye nezici ze-HTML5.
Qaphela lezi zixwayiso ezilandelayo uma usebenzisa i-Respond.js ekuthuthukisweni kwakho nasekukhiqizeni i-Internet Explorer 8.
Ukusebenzisa i-Respond.js nge-CSS isingathwe kwesinye (isizinda) esihlukile (isibonelo, ku-CDN) kudinga ukusetha okwengeziwe. Bona amadokhumenti e-Respond.js ukuze uthole imininingwane.
file://
Ngenxa yemithetho yezokuphepha yesiphequluli, i-Respond.js ayisebenzi namakhasi abukwa file://
ngephrothokholi (njengalapho uvula ifayela lendawo le-HTML). Ukuze uhlole izici ezisabelayo ku-IE8, buka amakhasi akho nge-HTTP(S). Bona amadokhumenti e-Respond.js ukuze uthole imininingwane.
@import
I-Respond.js ayisebenzi ne-CSS ekhonjwa nge- @import
. Ikakhulukazi, okunye ukucushwa kwe-Drupal kwaziwa kusetshenziswa @import
. Bona amadokhumenti e-Respond.js ukuze uthole imininingwane.
I-IE8 ayisekeli ngokugcwele box-sizing: border-box;
uma ihlanganiswa ne- min-width
, max-width
, min-height
, noma max-height
. Ngaleso sizathu, kusukela ku-v3.0.1, asisasebenzisi max-width
ku- .container
s.
I-IE8 inezinkinga ezithile @font-face
lapho ihlanganiswa ne- :before
. I-Bootstrap isebenzisa leyo nhlanganisela namaGlyphicons ayo. Uma ikhasi ligcinwe kunqolobane, futhi lilayishwa ngaphandle kwegundane phezu kwewindi (okungukuthi shaya inkinobho yokuvuselela noma layisha okuthile ku-iframe) bese ikhasi linikezwa ngaphambi kokuba ifonti ilayishwe. Ukuhambisa phezu kwekhasi (umzimba) kuzobonisa ezinye izithonjana futhi ukuhambisa phezulu kwezithonjana ezisele kuzobonisa nalezo. Bheka ukukhishwa okungu-#13863 ukuze uthole imininingwane.
I-Bootstrap ayisekelwe kumamodi amadala ahambisana ne-Internet Explorer. Ukuze uqiniseke ukuthi usebenzisa imodi yakamuva yokunikeza ye-IE, cabanga ukufaka <meta>
umaka ofanele emakhasini akho:
Qinisekisa imodi yedokhumenti ngokuvula amathuluzi okulungisa iphutha: cindezela F12bese uhlola "Imodi Yedokhumenti".
Le thegi ifakiwe kuwo wonke amadokhumenti nezibonelo ze-Bootstrap ukuze kuqinisekiswe ukunikezwa okungcono kakhulu ngangokunokwenzeka kunguqulo ngayinye esekelwayo ye-Internet Explorer.
Bona lo mbuzo we-StackOverflow ukuze uthole ulwazi olwengeziwe.
I-Internet Explorer 10 ayihlukanisi ububanzi bedivayisi kububanzi bembobo yokubuka , futhi ngaleyo ndlela ayisebenzisi kahle imibuzo yemidiya ku-CSS ye-Bootstrap. Ngokuvamile ungangeza amazwibela asheshayo we-CSS ukuze ulungise lokhu:
Kodwa-ke, lokhu akusebenzi kumadivayisi asebenzisa izinguqulo ze-Windows Phone 8 ezindala kune- Update 3 (aka GDR3) , njengoba kubangela ukuthi amadivayisi anjalo abonise ukubuka kakhulu kwedeskithophu esikhundleni sokubuka "kwefoni" emincane. Ukuze ubhekane nalokhu, uzodinga ukufaka phakathi i-CSS ne-JavaScript elandelayo ukuze usebenze mayelana nesiphazamisi .
Ukuze uthole ulwazi olwengeziwe nemihlahlandlela yokusebenzisa, funda I -Windows Phone 8 kanye Nobubanzi Bedivayisi .
Njengesihloko, sifaka lokhu kuwo wonke amadokhumenti nezibonelo ze-Bootstrap njengomboniso.
Injini enikezela ngezinguqulo ze-Safari ngaphambi kwe-v7.1 ye-OS X ne-Safari ye-iOS v8.0 ibe nenkinga ngenani lezindawo zamadesimali ezisetshenziswa .col-*-1
kumakilasi ethu egridi. Ngakho uma ubunamakholomu egridi angawodwana angu-12, uzoqaphela ukuthi abe mafushane uma kuqhathaniswa neminye imigqa yamakholomu. Ngaphandle kokuthuthukisa iSafari/iOS, unezinketho ezithile zokwenza umsebenzi:
.pull-right
kukholomu yakho yokugcina yegridi ukuze uthole ukuqondanisa okuqinile kwesokudlaUkusekelwa kwesici kukhawulelwe ku-iOS naku-Android overflow: hidden
. <body>
Ukuze wenze lokho, uma uskrola udlule phezulu noma phansi kwe-modal kunoma yisiphi salezo ziphequluli zalawo madivayisi, <body>
okuqukethwe kuzoqala ukuskrola. Bona iphutha le- Chrome #175502 (elilungiswe ku-Chrome v40) kanye nesiphazamisi se- WebKit #153852 .
Kusukela ku-iOS 9.3, ngenkathi i-modal ivuliwe, uma ukuthinta kokuqala kokuthinta kokuskrola kungaphakathi komngcele wombhalo <input>
noma we- <textarea>
, <body>
okuqukethwe okungaphansi kwe-modal kuzoskrolwa esikhundleni se-modal ngokwayo. Bona iphutha le-WebKit #153856 .
Futhi, qaphela ukuthi uma usebenzisa i-navbar engaguquki noma usebenzisa okokufaka ngaphakathi kwe-modal, i-iOS inesiphazamisi sokunikeza esingabuyekezi isimo sezinto ezingashintshi lapho ikhibhodi ebonakalayo iqaliswa. Izindlela ezimbalwa zokusebenza zalokhu zihlanganisa ukuguqula izici zakho zibe position: absolute
noma ukuncenga isibali sikhathi ekugxilweni ukuze uzame ukulungisa ukuma ngokwakho. Lokhu akuphathwa yi-Bootstrap, ngakho-ke kukuwe ukuthi unqume ukuthi yisiphi isisombululo esilungele isicelo sakho.
Isici .dropdown-backdrop
asisetshenziswa ku-iOS ku-nav ngenxa yobunkimbinkimbi be-z-indexing. Ngakho, ukuze uvale okwehliswayo kuma-navbar, kufanele uchofoze ngokuqondile into yokudonsela phansi (noma iyiphi enye into ezoqhumisa umcimbi wokuchofoza ku-iOS ).
Ukusondeza ikhasi kuveza ngokungagwemeki ukunikezwa kwama-artifact kwezinye izingxenye, ku-Bootstrap nakuyo yonke iwebhu. Kuye ngenkinga, singase sikwazi ukuyilungisa (sesha kuqala bese sivula inkinga uma kudingeka). Kodwa-ke, sivame ukukuziba lezi njengoba ngokuvamile zingenaso isixazululo esiqondile ngaphandle kwama-hacky workaround.
:hover
/ :focus
kuselulaNoma ukuhambisa phezulu kwangempela kungenzeki kuzikrini eziningi zokuthinta, iziphequluli eziningi zeselula zilingisa ukusekela okuzungezayo futhi zenze :hover
"okunamathelayo". Ngamanye amazwi, :hover
izitayela ziqala ukusebenza ngemva kokuthepha i-elementi futhi ziyeke ukusebenzisa ngemva kokuthi umsebenzisi ethephe enye into. Lokhu kungabangela ukuthi :hover
izifunda ze-Bootstrap "zinamathele" ngokungafanele kuziphequluli ezinjalo. Ezinye iziphequluli zeselula nazo zenza :focus
okufanayo kunamathele. Okwamanje alukho usizo olulula lwalezi zinkinga ngaphandle kokususa izitayela ezinjalo ngokuphelele.
Ngisho nakwezinye iziphequluli zesimanje, ukuphrinta kungaba quirky.
Ikakhulukazi, kusukela ku-Chrome v32 futhi kungakhathaliseki izilungiselelo zemajini, i-Chrome isebenzisa ububanzi bembobo yokubuka obuncane kakhulu kunosayizi wephepha ophathekayo lapho ixazulula imibuzo yemidiya ngenkathi iphrinta ikhasi lewebhu. Lokhu kungaholela ekutheni igridi ye-Bootstrap encane kakhulu isebenze ngokungalindelekile lapho iphrinta. Bona ukukhishwa okungu-#12078 kanye nesiphazamisi se- Chrome #273306 ukuze uthole imininingwane ethile. Izindlela zokulungisa eziphakanyisiwe:
@screen-*
okuguquguquka Okuncane ukuze iphepha lakho lokuphrinta lithathwe njengelikhulu kunelincane kakhulu.Futhi, kusukela ku-Safari v8.0, ububanzi obuhleliwe .container
s bungabangela i-Safari ukuthi isebenzise usayizi wefonti omncane ngokungavamile lapho iphrinta. Bona i-#14868 kanye nesiphazamisi seWebKit #138192 ukuze uthole imininingwane eyengeziwe. Enye indlela engaba khona yokwenza lokhu ukungeza i-CSS elandelayo:
Ngaphandle kwebhokisi, i-Android 4.1 (kanye nokunye okusha okukhishiwe ngokusobala) kuhamba ngomkhumbi ngohlelo lokusebenza Lwesiphequluli njengesiphequluli sewebhu esizenzakalelayo esikhethwayo (ngokungafani ne-Chrome). Ngeshwa, uhlelo lokusebenza Lwesiphequluli luneziphazamisi eziningi nokungahambisani ne-CSS ngokuvamile.
Ezicini <select>
, isiphequluli sesitoko se-Android ngeke sibonise izilawuli eziseceleni uma kukhona border-radius
kanye/noma border
kusetshenziswe. (Bona lo mbuzo we-StackOverflow ukuze uthole imininingwane.) Sebenzisa amazwibela ekhodi ngezansi ukuze ususe i-CSS ehlukumezayo futhi unikeze <select>
njengento engabhalwanga isitayela kusiphequluli sesitoko se-Android. Umsebenzisi ohogelayo ugwema ukuphazamiseka kweziphequluli ze-Chrome, Safari, ne-Mozilla.
Ufuna ukubona isibonelo? Bheka le demo ye-JS Bin.
Ukuze unikeze umuzwa ongcono kakhulu ongakhona kuziphequluli ezindala nezinesiphazamiso, i-Bootstrap isebenzisa ama- hack esiphequluli se-CSS ezindaweni ezimbalwa ukuze iqondise i-CSS ekhethekile kuzinguqulo ezithile zesiphequluli ukuze isebenze eduze kweziphazamisi kuziphequluli ngokwazo. Lawa ma-hacks ngokuqondakalayo abangela abaqinisekisi be-CSS ukuthi bakhononde ngokuthi awavumelekile. Ezindaweni ezimbalwa, sisebenzisa izici ze-CSS ezophayo ezingakamiswa ngokugcwele, kodwa lezi zisetshenziselwa ukuthuthukisa okuqhubekayo.
Lezi zexwayiso zokuqinisekisa azinandaba ekusebenzeni njengoba ingxenye engeyona eyokugebenga ye-CSS yethu iqinisekisa ngokugcwele futhi izingxenye ezikhohlisayo aziphazamisi ukusebenza kahle kwengxenye engeyona eyokugebenga, yingakho siziba ngamabomu lezi zexwayiso.
Amadokhumenti ethu e-HTML ngokufanayo anezexwayiso zokuqinisekisa ze-HTML ezingasho lutho nezingabalulekile ngenxa yokufakwa kwethu kwe-workaround yesiphazamisi esithile seFirefox .
Yize singasekeli ngokusemthethweni noma yimaphi ama-plugin noma izengezo zenkampani yangaphandle, sinikeza izeluleko eziwusizo ukusiza ukugwema izinkinga ezingaba khona kumaphrojekthi akho.
Enye isofthiwe yenkampani yangaphandle, ehlanganisa i-Google Amamephu kanye ne-Google Custom Search Engine, ingqubuzana ne-Bootstrap ngenxa * { box-sizing: border-box; }
, umthetho okwenza kube njalo padding
ayithinti ububanzi bokugcina obubaliwe bento. Funda kabanzi mayelana nemodeli yebhokisi nokulinganisa ku-CSS Tricks .
Kuye ngomongo, ungase ubhale ngaphezulu njengoba kudingekile (Inketho 1) noma usethe kabusha usayizi webhokisi kuzo zonke izifunda (Inketho 2).
I-Bootstrap ilandela izindinganiso zewebhu ezivamile futhi—ngomzamo omncane owengeziwe—ingasetshenziswa ukudala amasayithi afinyeleleka kulabo abasebenzisa i- AT .
Uma ukuzulazula kwakho kuqukethe izixhumanisi eziningi futhi kuza ngaphambi kokuqukethwe okuyinhloko ku-DOM, engeza Skip to main content
isixhumanisi ngaphambi kokuzulazula (ukuthola incazelo elula, bheka lesi sihloko sephrojekthi ye-A11Y mayelana nokweqa izixhumanisi zokuzulazula ). Ukusebenzisa .sr-only
ikilasi kuzofihla isixhumanisi sokweqa, futhi .sr-only-focusable
ikilasi lizoqinisekisa ukuthi isixhumanisi sibonakala uma sesigxilile (kubasebenzisi bekhibhodi ababonayo).
Ngenxa yokushiyeka isikhathi eside/iziphazamisi ku-Chrome (bona ukukhishwa 262171 ku-Chromium bug tracker ) kanye ne-Internet Explorer (bona lesi sihloko kuzixhumanisi zangaphakathi kwekhasi nokuhleleka okugxilile ), uzodinga ukwenza isiqiniseko sokuthi okuhlosiwe kwesixhumanisi sakho sokweqa okungenani iyagxila ngokohlelo ngokwengeza tabindex="-1"
.
Ukwengeza, ungase ufune ukucindezela ngokusobala inkomba yokugxila ebonakalayo kulokho okuqondiwe (ikakhulukazi njengoba i-Chrome okwamanje futhi isetha ukugxila ezintweni tabindex="-1"
lapho zichofozwa ngegundane) nge- #content:focus { outline: none; }
.
Qaphela ukuthi lesi siphazamisi sizophinde sithinte noma yiziphi ezinye izixhumanisi zangaphakathi kwekhasi okungenzeka isayithi lakho lizisebenzisa, zizenze zingasebenzi kubasebenzisi bekhibhodi. Ungase ucabange ukwengeza ukulungisa okufanayo kwegebe kuwo wonke amanye amahange/iziqephu zokuhlonza ezisebenza njengokuhlosiwe kwesixhumanisi.
Lapho wenza isidleke izihloko ( <h1>
- <h6>
), unhlokweni wedokhumenti yakho eyinhloko kufanele ube <h1>
. Izihloko ezilandelayo kufanele zisebenzise ngokunengqondo <h2>
- <h6>
kangangokuthi izifundi zesikrini zingakha uhlu lokuqukethwe emakhasini akho.
Funda kabanzi ku- HTML CodeSniffer kanye ne -Penn State's AccessAbility .
Okwamanje, ezinye izinhlanganisela zemibala ezizenzakalelayo ezitholakala ku-Bootstrap (njengezigaba ezihlukene zezinkinobho ezinesitayela, eminye yemibala egqamisa ikhodi esetshenziselwa amabhulokhi ekhodi eyisisekelo , isigaba somsizi .bg-primary
wangemuva komongo , nombala wesixhumanisi ozenzakalelayo uma usetshenziswa kungemuva elimhlophe) ibe nesilinganiso esiphansi sokungafani (ngaphansi kwesilinganiso esinconyiwe esingu-4.5:1 ). Lokhu kungabangela izinkinga kubasebenzisi abangaboni kahle noma abangaboni imibala. Le mibala ezenzakalelayo ingase idinge ukushintshwa ukuze kwandiswe ukugqama nokufaneleka kwayo.
I-Bootstrap ikhishwa ngaphansi kwelayisense ye-MIT futhi iyi-copyright ka-2016 Twitter. Ibilisiwe ibe yizingxenyana ezincane, ingachazwa ngalezi zimo ezilandelayo.
Ilayisensi egcwele ye-Bootstrap itholakala endaweni yephrojekthi ukuze uthole ulwazi olwengeziwe.
Amalungu omphakathi ahumushe imibhalo ye-Bootstrap ezilimini ezihlukahlukene. Abekho abasekelwa ngokusemthethweni futhi kungenzeka bangahlali besesimweni.
Asisizi ukuhlela noma ukusingatha ukuhumusha, sivele sikuxhumanise nakho.
Uqedile ukuhumusha okusha noma okungcono? Vula isicelo sokudonsa ukuze usingeze ohlwini lwethu.