Kuyambapo
Chidule cha Bootstrap, momwe mungatsitse ndikugwiritsa ntchito, ma tempulo oyambira ndi zitsanzo, ndi zina zambiri.
Chidule cha Bootstrap, momwe mungatsitse ndikugwiritsa ntchito, ma tempulo oyambira ndi zitsanzo, ndi zina zambiri.
Bootstrap (pakali pano v3.3.7) ili ndi njira zosavuta zoyambira mwachangu, iliyonse imakopa luso losiyana ndi momwe mungagwiritsire ntchito. Werengani kuti muwone zomwe zikugwirizana ndi zosowa zanu.
Kuphatikizidwa ndi kusinthidwa CSS, JavaScript, ndi mafonti. Palibe zolemba kapena mafayilo oyambira omwe akuphatikizidwa.
Source Less, JavaScript, ndi mafayilo amtundu, pamodzi ndi zolemba zathu. Pamafunika Pang'ono compiler ndi zina khwekhwe.
Bootstrap yonyamulidwa kuchokera ku Less kupita ku Sass kuti iphatikizidwe mosavuta mu Rails, Compass, kapena ma projekiti a Sass okha.
Anthu aku jsDelivr mokoma mtima amapereka chithandizo cha CDN pa CSS ya Bootstrap ndi JavaScript. Ingogwiritsani ntchito maulalo awa a Bootstrap CDN .
Mutha kukhazikitsanso ndikuwongolera Zochepa za Bootstrap, CSS, JavaScript, ndi mafonti pogwiritsa ntchito Bower :
Mukhozanso kukhazikitsa Bootstrap pogwiritsa ntchito npm :
require('bootstrap')
idzatsegula mapulagini onse a Bootstrap a jQuery pa chinthu cha jQuery. Module bootstrap
palokha situmiza kunja chilichonse. Mutha kuyika mapulagini a Bootstrap a jQuery payekhapayekha pokweza /js/*.js
mafayilo pansi pa chikwatu chapamwamba cha phukusi.
Bootstrap's package.json
ili ndi metadata yowonjezera pansi pa makiyi awa:
less
- njira yopita ku fayilo yayikulu ya Bootstrap ya Less sourcestyle
- njira yopita ku CSS yosagwirizana ndi Bootstrap yomwe idakonzedweratu pogwiritsa ntchito zosintha (palibe makonda)Mutha kukhazikitsanso ndikuwongolera Zochepa za Bootstrap, CSS, JavaScript, ndi mafonti pogwiritsa ntchito Composer :
Bootstrap imagwiritsa ntchito Autoprefixer kuthana ndi zoyambira za ogulitsa CSS . Ngati mukulemba Bootstrap kuchokera ku Less/Sass gwero lake ndipo osagwiritsa ntchito Gruntfile yathu, muyenera kuphatikiza Autoprefixer pakupanga kwanu nokha. Ngati mukugwiritsa ntchito Bootstrap yopangidwa kale kapena kugwiritsa ntchito Gruntfile yathu, simuyenera kuda nkhawa ndi izi chifukwa Autoprefixer yaphatikizidwa kale mu Gruntfile yathu.
Bootstrap imatsitsidwa m'njira ziwiri, momwe mungapezere zolemba ndi mafayilo otsatirawa, ndikuyika m'magulu azinthu zomwe zimagwirizana ndikupereka mitundu yonse yophatikizidwa komanso yocheperako.
Chonde dziwani kuti mapulagini onse a JavaScript amafuna kuti jQuery iphatikizidwe, monga momwe tawonetsera pachithunzi choyambira . Funsani athubower.json
kuti muwone mitundu ya jQuery yothandizidwa.
Mukatsitsa, tsegulani chikwatu choponderezedwa kuti muwone mawonekedwe a (wophatikizidwa) Bootstrap. Mudzawona chonga ichi:
Uwu ndiye mtundu wofunikira kwambiri wa Bootstrap: mafayilo opangidwa kale kuti mugwiritse ntchito mwachangu pafupifupi pulojekiti iliyonse. Timapereka CSS ndi JS ( bootstrap.*
), kuphatikizapo CSS ndi JS ( bootstrap.min.*
). Mamapu a CSS ( bootstrap.*.map
) alipo kuti agwiritsidwe ntchito ndi zida zopangira asakatuli ena. Mafonti ochokera ku Glyphicons akuphatikizidwa, monganso mutu wa Bootstrap wosankha.
The Bootstrap source code download imaphatikizapo CSS, JavaScript, ndi font assets, komanso source Less, JavaScript, ndi zolemba. Mwachindunji, zikuphatikizapo zotsatirazi ndi zina:
The less/
, js/
, ndipo fonts/
ndi magwero a CSS, JS, ndi zilembo zazithunzi (motsatira). Chikwatucho dist/
chimaphatikizapo zonse zomwe zalembedwa mugawo lotsitsa lomwe lasanjidwa pamwambapa. Fodayi docs/
imaphatikizapo gwero la zolemba zathu, komanso examples/
kugwiritsa ntchito Bootstrap. Kupitilira apo, fayilo ina iliyonse yophatikizidwa imapereka chithandizo pamaphukusi, zidziwitso zamalayisensi, ndi chitukuko.
Bootstrap imagwiritsa ntchito Grunt pamakina ake omanga, ndi njira zosavuta zogwirira ntchito ndi chimango. Ndi momwe timapangira ma code athu, kuyesa mayeso, ndi zina zambiri.
Kuti muyike Grunt, muyenera kutsitsa ndikuyika node.js (yomwe imaphatikizapo npm). npm imayimira ma node packaged modules ndipo ndi njira yoyendetsera kudalira kwachitukuko kudzera node.js.
Kenako, kuchokera pamzere wolamula:grunt-cli
padziko lonse lapansi ndi npm install -g grunt-cli
./bootstrap/
directory, kenako thamangani npm install
. npm idzayang'ana package.json
fayilo ndikuyika zokha zodalira zomwe zalembedwa pamenepo.Mukamaliza, mudzatha kuyendetsa malamulo osiyanasiyana a Grunt operekedwa kuchokera pamzere wolamula.
grunt dist
(Ingophatikizani CSS ndi JavaScript)Imakonzanso /dist/
chikwatucho ndi mafayilo ophatikizidwa ndi ma CSS ndi JavaScript. Monga wogwiritsa ntchito Bootstrap, ili ndi lamulo lomwe mukufuna.
grunt watch
(Penyani)Imawonera mafayilo Ocheperako ndikungowabwezeranso ku CSS nthawi iliyonse mukasunga zosintha.
grunt test
(Thamangani mayeso)Imayendetsa JSHnt ndikuyesa mayeso a QUnit opanda mutu mu PhantomJS .
grunt docs
(Pangani & yesani katundu wa ma docs)Amamanga ndi kuyesa CSS, JavaScript, ndi zinthu zina zomwe zimagwiritsidwa ntchito polemba zolembedwa kwanuko kudzera bundle exec jekyll serve
.
grunt
(Pangani chilichonse ndikuyesa mayeso)Imaphatikiza ndikuchepetsa CSS ndi JavaScript, imapanga tsamba lazolemba, imayendetsa HTML5 yovomerezeka motsutsana ndi zolemba, imapanganso katundu wa Customizer, ndi zina zambiri. Imafunika Jekyll . Nthawi zambiri zimangofunika ngati mukubera Bootstrap yokha.
Mukakumana ndi zovuta pakuyika zodalira kapena kugwiritsa ntchito malamulo a Grunt, choyamba chotsani /node_modules/
chikwatu chopangidwa ndi npm. Kenako, bwerezaninso npm install
.
Yambani ndi template iyi ya HTML, kapena sinthani zitsanzo izi . Tikukhulupirira kuti mukonza ma tempulo ndi zitsanzo zathu, kuzisintha kuti zigwirizane ndi zosowa zanu.
Lembani HTML ili pansipa kuti muyambe kugwira ntchito ndi zolemba zochepa za Bootstrap.
Mangani pa template yoyambira pamwambapa ndi zigawo zambiri za Bootstrap. Tikukulimbikitsani kuti musinthe ndikusintha Bootstrap kuti igwirizane ndi zosowa za polojekiti yanu.
Pezani gwero lachitsanzo chilichonse pansipa potsitsa zosungira za Bootstrap . Zitsanzo zitha kupezeka m'ndandanda docs/examples/
.
Pangani navbar yokhazikika yokhala ndi maulalo oyenera. Mungodziwiratu! Osati kwambiri Safari wochezeka.
Bootlint ndiye chida chovomerezeka cha Bootstrap HTML. Imangoyang'ana zolakwika zingapo za HTML m'masamba omwe akugwiritsa ntchito Bootstrap mwanjira ya "vanilla". Magawo / ma widget a Vanilla Bootstrap amafunikira magawo awo a DOM kuti agwirizane ndi zina. Bootlint amayang'ana kuti magawo a Bootstrap ali ndi HTML yokonzedwa bwino. Ganizirani zowonjeza Bootlint ku Bootstrap tsamba lanu lachitukuko cha zida kuti pasakhale cholakwika chilichonse chomwe chimachepetsa kukula kwa polojekiti yanu.
Khalani odziwa za kakulidwe ka Bootstrap ndikufikira anthu ammudzi ndi zinthu zothandizazi.
irc.freenode.net
seva, mu ##bootstrap channel .twitter-bootstrap-3
.bootstrap
pamaphukusi omwe amasintha kapena kuwonjezera magwiridwe antchito a Bootstrap akamagawa kudzera mu npm kapena njira zofananira zotumizira kuti adziwike kwambiri.Mutha kutsatiranso @getbootstrap pa Twitter pazamiseche zaposachedwa komanso makanema ochititsa chidwi anyimbo.
Bootstrap imangosintha masamba anu kuti aziwoneka mosiyanasiyana. Umu ndi momwe mungaletsere izi kuti tsamba lanu lizigwira ntchito ngati chitsanzo chosalabadira .
<meta>
atchulidwa muzolemba za CSSwidth
pa gawo .container
lililonse la gridi ndi m'lifupi mwake, mwachitsanzo width: 970px !important;
Onetsetsani kuti izi zimabwera pambuyo pa CSS ya Bootstrap. Mutha kupewa mwasankha !important
ndi mafunso azama media kapena selector-fu..col-xs-*
makalasi kuwonjezera, kapena m'malo mwa apakati / akulu. Osadandaula, gridi yazida zing'onozing'ono zimafikira kumalingaliro onse.Mudzafunikabe Respond.js ya IE8 (popeza mafunso athu atolankhani akadalipo ndipo akuyenera kukonzedwa). Izi zimayimitsa "tsamba la m'manja" la Bootstrap.
Tagwiritsa ntchito izi pa chitsanzo. Werengani gwero lake kuti muwone zosintha zomwe zakhazikitsidwa.
Mukuyang'ana kusuntha kuchokera ku mtundu wakale wa Bootstrap kupita ku v3.x ? Onani kalozera wathu wosamukira .
Bootstrap imapangidwa kuti izigwira ntchito bwino pamakompyuta aposachedwa ndi asakatuli am'manja, kutanthauza kuti asakatuli akale amatha kuwonetsa mosiyanasiyana, ngakhale akugwira ntchito mokwanira, kumasulira kwazinthu zina.
Makamaka, timathandizira mitundu yaposachedwa ya asakatuli ndi nsanja zotsatirazi.
Asakatuli ena omwe amagwiritsa ntchito mtundu waposachedwa kwambiri wa WebKit, Blink, kapena Gecko, kaya mwachindunji kapena kudzera pawebusayiti ya API, samathandizidwa. Komabe, Bootstrap iyenera (nthawi zambiri) kuwonetsa ndikugwira ntchito moyenera msakatuliwanso. Zambiri zothandizira zikuperekedwa pansipa.
Nthawi zambiri, Bootstrap imathandizira mitundu yaposachedwa ya asakatuli amtundu uliwonse. Dziwani kuti asakatuli a proxy (monga Opera Mini, Opera Mobile's Turbo mode, UC Browser Mini, Amazon Silk) sagwiritsidwa ntchito.
Chrome | Firefox | Safari | |
---|---|---|---|
Android | Zothandizidwa | Zothandizidwa | N / A |
iOS | Zothandizidwa | Zothandizidwa | Zothandizidwa |
Mofananamo, mitundu yaposachedwa ya asakatuli ambiri apakompyuta imathandizidwa.
Chrome | Firefox | Internet Explorer | Opera | Safari | |
---|---|---|---|---|---|
Mac | Zothandizidwa | Zothandizidwa | N / A | Zothandizidwa | Zothandizidwa |
Mawindo | Zothandizidwa | Zothandizidwa | Zothandizidwa | Zothandizidwa | Osathandizidwa |
Pa Windows, timathandizira Internet Explorer 8-11 .
Kwa Firefox, kuwonjezera pa kumasulidwa kokhazikika kwaposachedwa, timathandiziranso mtundu waposachedwa wa Extended Support Release (ESR) wa Firefox.
Mosavomerezeka, Bootstrap iyenera kuyang'ana ndikuchita bwino mu Chromium ndi Chrome ya Linux, Firefox ya Linux, ndi Internet Explorer 7, komanso Microsoft Edge, ngakhale sizimathandizidwa.
Kuti mupeze mndandanda wazovuta zina za msakatuli zomwe Bootstrap ikuyenera kulimbana nazo, onani Wall of browser bugs .
Internet Explorer 8 ndi 9 imathandizidwanso, komabe, chonde dziwani kuti zinthu zina za CSS3 ndi HTML5 sizimathandizidwa mokwanira ndi asakatuliwa. Kuphatikiza apo, Internet Explorer 8 imafuna kugwiritsa ntchito Respond.js kuti ithandizire kuthandizira pafunso la media.
Mbali | Internet Explorer 8 | Internet Explorer 9 |
---|---|---|
border-radius |
Osathandizidwa | Zothandizidwa |
box-shadow |
Osathandizidwa | Zothandizidwa |
transform |
Osathandizidwa | Zothandizidwa, ndi -ms prefix |
transition |
Osathandizidwa | |
placeholder |
Osathandizidwa |
Pitani Kodi ndingagwiritse ntchito... kuti mudziwe zambiri za chithandizo cha msakatuli cha CSS3 ndi HTML5.
Chenjerani ndi zidziwitso zotsatirazi mukamagwiritsa ntchito Respond.js m'malo anu otukuka komanso opangira Internet Explorer 8.
Kugwiritsa ntchito Respond.js yokhala ndi CSS yosungidwa kumalo osiyanasiyana (mwachitsanzo, pa CDN) kumafuna kukhazikitsidwa kwina. Onani zolemba za Respond.js kuti mumve zambiri.
file://
Chifukwa cha malamulo achitetezo a msakatuli, Respond.js sigwira ntchito ndi masamba omwe amawonedwa kudzera mu file://
protocol (monga potsegula fayilo yapafupi ya HTML). Kuti muyese mawonekedwe omvera mu IE8, onani masamba anu pa HTTP(S). Onani zolemba za Respond.js kuti mumve zambiri.
@import
Respond.js sikugwira ntchito ndi CSS yomwe imatchulidwa kudzera pa @import
. Makamaka, masinthidwe ena a Drupal amadziwika kuti amagwiritsa ntchito @import
. Onani zolemba za Respond.js kuti mumve zambiri.
IE8 sichirikiza kwathunthu box-sizing: border-box;
ikaphatikizidwa ndi min-width
, max-width
, min-height
, kapena max-height
. Pachifukwa chimenecho, kuyambira v3.0.1, sitigwiritsanso ntchito max-width
pa .container
s.
IE8 ili ndi zovuta zina @font-face
ikaphatikizidwa ndi :before
. Bootstrap imagwiritsa ntchito kuphatikiza kumeneko ndi Glyphicons zake. Ngati tsamba lasungidwa, ndikukwezedwa popanda mbewa pawindo (mwachitsanzo, dinani batani lotsitsimutsa kapena kutsitsa china chake mu iframe) ndiye tsambalo limaperekedwa mafonti asanafike. Kuyenda pamwamba pa tsamba (thupi) kuwonetsa zina mwazithunzi ndikuyenda pamwamba pazithunzi zomwe zatsala ziwonetsanso. Onani nkhani #13863 kuti mumve zambiri.
Bootstrap sichirikizidwa mumayendedwe akale a Internet Explorer. Kuti mutsimikize kuti mukugwiritsa ntchito mawonekedwe aposachedwa kwambiri a IE, ganizirani kuphatikiza <meta>
tag yoyenera patsamba lanu:
Tsimikizirani mawonekedwe a chikalatacho potsegula zida zosinthira: dinani F12ndikuyang'ana "Document Mode".
Chizindikirochi chikuphatikizidwa m'zolemba zonse za Bootstrap ndi zitsanzo kuti zitsimikizire kumasulira kwabwino kwambiri mumtundu uliwonse wothandizidwa wa Internet Explorer.
Onani funso ili la StackOverflow kuti mumve zambiri.
Internet Explorer 10 simasiyanitsa kukula kwa chipangizo ndi m'lifupi mwa malo owonera , motero sichigwiritsa ntchito moyenera mafunso atolankhani mu CSS ya Bootstrap. Nthawi zambiri mumangowonjezera kachidutswa kakang'ono ka CSS kuti mukonze izi:
Komabe, izi sizikugwira ntchito pazida zomwe zimagwiritsa ntchito mitundu ya Windows Phone 8 yakale kuposa Update 3 (aka GDR3) , chifukwa zimapangitsa kuti zida zotere ziwonetsere mawonekedwe apakompyuta m'malo mwa "foni" yopapatiza. Kuti muchite izi, mufunika kuphatikiza CSS ndi JavaScript zotsatirazi kuti mugwiritse ntchito cholakwikacho .
Kuti mudziwe zambiri ndi malangizo ogwiritsira ntchito, werengani Windows Phone 8 ndi Device-Width .
Monga mutu, tikuphatikiza izi muzolemba zonse za Bootstrap ndi zitsanzo ngati chiwonetsero.
Injini yomasulira yamitundu ya Safari isanachitike v7.1 ya OS X ndi Safari ya iOS v8.0 inali ndi vuto ndi kuchuluka kwa malo omwe amagwiritsidwa ntchito m'makalasi athu .col-*-1
a grid. Chifukwa chake ngati mutakhala ndi magawo 12 amtundu uliwonse, mutha kuwona kuti adabwera achidule poyerekeza ndi mizere ina. Kupatula kukulitsa Safari/iOS, muli ndi njira zina zogwirira ntchito:
.pull-right
lanu lomaliza la gridi kuti mulumikizane bwino kumanjaThandizo overflow: hidden
pa <body>
chinthucho ndi chochepa mu iOS ndi Android. Kuti izi zitheke, mukamadutsa pamwamba kapena pansi pa modal mu msakatuli uliwonse wa zidazo, zomwe <body>
zili mkatimo zimayamba kusuntha. Onani Chrome bug #175502 (yokhazikika mu Chrome v40) ndi WebKit bug #153852 .
Pofika pa iOS 9.3, pomwe modal imatsegulidwa, ngati kukhudza koyambirira kwa mpukutu kumakhala m'malire a malemba <input>
kapena a <textarea>
, zomwe <body>
zili pansi pa modal zidzasunthidwa m'malo mwa modal yokha. Onani cholakwika cha WebKit #153856 .
Komanso, dziwani kuti ngati mukugwiritsa ntchito navbar yokhazikika kapena kugwiritsa ntchito zolowetsa mkati mwa modal, iOS ili ndi cholakwika chomwe sichisintha malo azinthu zokhazikika pomwe kiyibodi yeniyeni yayambika. Njira zingapo zochitira izi zikuphatikiza kusintha zinthu zanu kukhala position: absolute
kapena kuyitanitsa chowerengera kuti muyese kukonza pamanja. Izi sizimayendetsedwa ndi Bootstrap, chifukwa chake zili ndi inu kusankha njira yomwe ili yabwino kwambiri pakugwiritsa ntchito kwanu.
Chinthucho .dropdown-backdrop
sichimagwiritsidwa ntchito pa iOS mu nav chifukwa cha zovuta za z-indexing. Chifukwa chake, kuti mutseke zotsikira mu navbars, muyenera kudina mwachindunji chinthucho (kapena china chilichonse chomwe chingatsegule chochitika mu iOS ).
Kuyang'ana masamba mosalephera kumapereka zinthu zakale muzinthu zina, mu Bootstrap ndi intaneti yonse. Kutengera ndi vuto, titha kukonza (fufuzani kaye kenako ndikutsegulanso ngati pakufunika kutero). Komabe, timakonda kunyalanyaza izi chifukwa nthawi zambiri alibe yankho lachindunji kupatula ma workaround achinyengo.
:hover
/ :focus
pa mafoniNgakhale kuyendayenda kwenikweni sikungatheke pazithunzi zambiri, asakatuli ambiri am'manja amatsanzira chithandizo chokhazikika ndikupanga :hover
"chomata". Mwa kuyankhula kwina, :hover
masitayelo amayamba kugwira ntchito atadina chinthucho ndipo amangosiya kugwiritsa ntchito pambuyo poti wagwiritsa ntchito chinthu china. Izi zitha kupangitsa kuti mayiko a Bootstrap :hover
akhale "osakhazikika" pakusakatula kotere. Ma msakatuli ena am'manja amapangitsanso :focus
chimodzimodzi. Pakalipano palibe njira yosavuta yothetsera nkhaniyi kupatula kuchotsa masitayelo otere.
Ngakhale m'masakatuli ena amakono, kusindikiza kungakhale kosokoneza.
Makamaka, monga Chrome v32 ndipo mosasamala kanthu za makonda am'mphepete, Chrome imagwiritsa ntchito mawonekedwe owonera mocheperapo kuposa kukula kwa pepala poyankha mafunso atolankhani ndikusindikiza tsamba. Izi zitha kupangitsa kuti grid yaing'ono ya Bootstrap iyambike mosayembekezereka posindikiza. Onani nkhani #12078 ndi Chrome bug #273306 kuti mumve zambiri. Njira zoyeserera:
@screen-*
Zocheperako kuti pepala lanu losindikiza liwoneke ngati lalikulu kuposa laling'ono.Komanso, monga Safari v8.0, fixed-width .container
s ingayambitse Safari kugwiritsa ntchito font yaying'ono posindikiza. Onani #14868 ndi WebKit bug #138192 kuti mumve zambiri. Njira imodzi yochitira izi ndikuwonjezera CSS iyi:
Kuchokera m'bokosilo, Android 4.1 (ndiponso zotulutsa zatsopano) zimatumiza ndi pulogalamu ya Msakatuli ngati msakatuli wosankha (mosiyana ndi Chrome). Tsoka ilo, pulogalamu ya Msakatuli ili ndi zolakwika zambiri komanso zosagwirizana ndi CSS yonse.
Pazinthu <select>
, msakatuli wa stock wa Android sawonetsa zowongolera zam'mbali ngati pali ndi border-radius
/ kapena border
kugwiritsidwa ntchito. (Onani funso ili la StackOverflow kuti mumve zambiri.) Gwiritsani ntchito kaduka kakang'ono ka khodi ili m'munsimu kuti muchotse CSS yolakwayo ndikupereka <select>
ngati chinthu chosasinthidwa pa msakatuli wa stock wa Android. Wogwiritsa ntchito akununkhiza amapewa kusokoneza asakatuli a Chrome, Safari, ndi Mozilla.
Mukufuna kuwona chitsanzo? Onani chiwonetsero cha JS Bin ichi.
Kuti apereke chidziwitso chabwino kwambiri kwa asakatuli akale ndi ngolo, Bootstrap imagwiritsa ntchito ma hacks a CSS m'malo angapo kulunjika CSS yapadera kumitundu ina ya asakatuli kuti azitha kuthana ndi nsikidzi mu osatsegula okha. Ma hacks awa momveka amapangitsa ovomerezeka a CSS kudandaula kuti ndiwosavomerezeka. M'malo angapo, timagwiritsanso ntchito zida za CSS zotuluka magazi zomwe sizinakhazikike bwino, koma zimagwiritsidwa ntchito pongowonjezera pang'onopang'ono.
Machenjezo ovomerezekawa alibe ntchito chifukwa gawo la CSS lathu lopanda chinyengo limatsimikizira bwino ndipo magawo omwe amasokoneza samasokoneza kugwira ntchito moyenera kwa gawo lopanda chinyengo, chifukwa chake timanyalanyaza dala machenjezo awa.
Zolemba zathu za HTML zilinso ndi machenjezo ang'onoang'ono komanso osafunikira a HTML chifukwa chophatikizira njira yothetsera vuto linalake la Firefox .
Ngakhale sitigwirizana ndi mapulagini a gulu lachitatu kapena zowonjezera, timapereka malangizo othandiza kuti tipewe zovuta zomwe zingachitike pamapulojekiti anu.
Mapulogalamu ena achipani chachitatu, kuphatikiza Google Maps ndi Google Custom Search Engine, amatsutsana ndi Bootstrap chifukwa * { box-sizing: border-box; }
, lamulo lomwe limapangitsa kuti kutero padding
silikhudza kuchuluka komaliza kwa chinthu. Phunzirani zambiri za chitsanzo cha bokosi ndi kukula pa CSS Tricks .
Kutengera ndi nkhani, mutha kupitilira momwe mungafunikire (Chosankha 1) kapena kukonzanso kukula kwa bokosi m'magawo onse (Njira 2).
Bootstrap imatsatira miyezo yodziwika bwino yapaintaneti ndipo-popanda kuyesetsa pang'ono-ingagwiritsidwe ntchito kupanga masamba omwe azitha kufika kwa omwe amagwiritsa ntchito AT .
Ngati mayendedwe anu ali ndi maulalo ambiri ndipo amabwera patsogolo pa zomwe zili mu DOM, onjezani Skip to main content
ulalo musanasamuke (kuti mumve zambiri, onani nkhani iyi ya A11Y Project podumpha maulalo oyenda ). Kugwiritsa ntchito .sr-only
kalasiyo kumabisa ulalo wodumphira, ndipo .sr-only-focusable
kalasiyo iwonetsetsa kuti ulalowo ukuwoneka ukangoyang'ana (kwa ogwiritsa ntchito kiyibodi).
Chifukwa cha zofooka / nsikidzi zomwe zakhalapo kwa nthawi yayitali mu Chrome (onani nkhani 262171 mu Chromium bug tracker ) ndi Internet Explorer (onani nkhaniyi pa maulalo atsamba ndi dongosolo lolunjika ), muyenera kuwonetsetsa kuti chandamale cha ulalo wanu wodumpha. imakhazikika mwadongosolo powonjezera tabindex="-1"
.
Kuphatikiza apo, mungafune kupondereza mwatsatanetsatane zomwe zikuwonekera pa chandamale (makamaka monga momwe Chrome pakadali pano imayikanso chidwi pazinthu zomwe tabindex="-1"
zimadindidwa ndi mbewa) ndi #content:focus { outline: none; }
.
Dziwani kuti cholakwikachi chikhudzanso maulalo ena aliwonse apatsamba omwe tsamba lanu lingakhale likugwiritsa ntchito, kupangitsa kuti akhale opanda ntchito kwa ogwiritsa ntchito kiyibodi. Mutha kuganiza zowonjeza kukonzanso kofananira kwa ma nangula / zizindikiritso zina zonse zomwe zimakhala ngati ulalo.
Mukamapanga zisa ( <h1>
- <h6>
), mutu wanu woyamba uyenera kukhala <h1>
. Mitu yotsatira iyenera kugwiritsa ntchito mwanzeru <h2>
- <h6>
kotero kuti owerenga zenera amatha kupanga mndandanda wazomwe zili patsamba lanu.
Phunzirani zambiri pa HTML CodeSniffer ndi AccessAbility ya Penn State .
Pakadali pano, mitundu ina yosasinthika yamitundu yomwe ikupezeka mu Bootstrap (monga makalasi a mabatani osiyanasiyana, mitundu ina yowunikira yomwe imagwiritsidwa ntchito pamakina oyambira , gulu lothandizira lakumbuyo , ndi mtundu wa ulalo wokhazikika ukagwiritsidwa ntchito chakumbuyo koyera) khalani ndi chiŵerengero chochepa cha kusiyana (pansi pa chiŵerengero chovomerezeka cha 4.5:1 ). Izi zingayambitse mavuto kwa ogwiritsa ntchito omwe sawona bwino kapena omwe ali akhungu. Mitundu yosasinthayi ingafunike kusinthidwa kuti ionjezere kusiyana kwake ndi kumveka kwake..bg-primary
Bootstrap imatulutsidwa pansi pa layisensi ya MIT ndipo ndi copyright 2016 Twitter. Kuphika mpaka tinthu tating'onoting'ono, titha kufotokozedwa ndi zotsatirazi.
Layisensi yonse ya Bootstrap ili m'malo osungira projekiti kuti mudziwe zambiri.
Anthu ammudzi amasulira zolemba za Bootstrap m'zilankhulo zosiyanasiyana. Palibe omwe amathandizidwa mwalamulo ndipo mwina sangakhale amakono nthawi zonse.
Sitithandizira kukonza kapena kuchititsa zomasulira, timangolumikizana nazo.
Mwamaliza kumasulira kwatsopano kapena kwabwinoko? Tsegulani zopempha kuti muwonjezere pamndandanda wathu.