Ka nānā 'ana i ka papahana, kona mau mea, a pehea e ho'omaka ai me kahi ma'alahi.
Ma mua o ka hoʻoiho ʻana, e hōʻoia e loaʻa i kahi hoʻoponopono code (ke paipai mākou iā Sublime Text 2 ) a me kekahi ʻike hana o HTML a me CSS. ʻAʻole mākou e hele i nā faila kumu ma aneʻi, akā hiki ke hoʻoiho ʻia. E kālele mākou i ka hoʻomaka ʻana me nā faila Bootstrap i hui ʻia.
ʻO ke ala wikiwiki loa e hoʻomaka ai: e kiʻi i nā mana i hōʻuluʻulu ʻia a hoʻemi ʻia o kā mākou CSS, JS, a me nā kiʻi. ʻAʻohe palapala a i ʻole nā faila kumu kumu.
E kiʻi i nā faila kumu no nā CSS a me JavaScript, me kahi kope kūloko o nā palapala ma ka hoʻoiho pololei ʻana i ka mana hou loa mai GitHub.
I loko o ka hoʻoiho ʻana e ʻike ʻoe i ka hoʻolālā faila a me nā ʻike, e hui pū i nā waiwai maʻamau a hāʻawi i nā ʻano like ʻole i hōʻuluʻulu ʻia a i hoʻemi ʻia.
Ke hoʻoiho ʻia, wehe i ka waihona i hoʻopili ʻia e ʻike i ke ʻano o (ka hui ʻia) Bootstrap. E ʻike ʻoe i kekahi mea e like me kēia:
kaʻa wāwae / ├── css / │ ├── kaʻa . css │ ├── bootstrap . min . css ├── js / │ ├── bootstrap . js │ ├── bootstrap . min . js └── img / ├── glyphicons - halflings . png └── glyphicons - halflings - keʻokeʻo . png
ʻO kēia ke ʻano maʻamau o Bootstrap: nā faila i hōʻuluʻulu ʻia no ka hoʻohana wikiwiki ʻana i loko o kahi papahana pūnaewele. Hāʻawi mākou i CSS i hui pū ʻia a me JS ( bootstrap.*
), a me CSS i hōʻuluʻulu ʻia a hoʻemi ʻia a me JS ( bootstrap.min.*
). Hoʻopili ʻia nā faila kiʻi me ka hoʻohana ʻana iā ImageOptim , he polokalamu Mac no ka hoʻoomi ʻana i nā PNG.
E ʻoluʻolu e hoʻomaopopo i nā plugins JavaScript āpau e koi i ka jQuery e hoʻokomo.
Hele mai ʻo Bootstrap me HTML, CSS, a me JS no nā ʻano mea like ʻole, akā hiki ke hōʻuluʻulu ʻia me ka liʻiliʻi o nā ʻāpana i ʻike ʻia ma luna o ka palapala Bootstrap .
Nā kaila honua no ke kino e hoʻihoʻi hou i ke ʻano a me ka hope, nā ʻano loulou, ka ʻōnaehana grid, a me ʻelua hoʻolālā maʻalahi.
Nā ʻano no nā mea HTML maʻamau e like me typography, code, tables, forms, and buttons. Hoʻopili pū ʻia nā Glyphicons , kahi hoʻonohonoho kiʻi liʻiliʻi nui.
Nā ʻano maʻamau no nā mea hoʻopili maʻamau e like me nā tab a me nā pila, navbar, nā makaʻala, nā pane ʻaoʻao, a me nā mea hou aku.
E like me nā Components, ʻo kēia mau plugins JavaScript he mau mea pili no nā mea e like me nā hāmeʻa, popovers, modals, a me nā mea hou aku.
Hoʻohui pū ʻia nā ʻāpana ʻāpana a me JavaScript plugins e hāʻawi i kēia mau mea kikowaena:
Ma nā alakaʻi e hiki mai ana, hiki iā mākou ke hele i kēia mau ʻāpana i nā kikoʻī hou aku. A hiki i kēlā manawa, e ʻimi i kēlā me kēia i loko o ka palapala no ka ʻike e pili ana i ka hoʻohana ʻana a me ka hana ʻana iā lākou.
Me kahi hoʻolauna pōkole i nā mea i waho o ke ala, hiki iā mākou ke nānā aku i ka hoʻohana ʻana iā Bootstrap. No ka hana ʻana i kēlā, e hoʻohana mākou i kahi template HTML maʻamau e pili ana i nā mea a pau a mākou i ʻōlelo ai i ka hoʻolālā faila .
I kēia manawa, eia ka nānā ʻana i kahi faila HTML maʻamau :
- <!DOCTYPE html>
- <html>
- <poʻo>
- <title> Bootstrap 101 Template </title>
- <meta name = "viewport" maʻiʻo = "ākea=ākea-ākea, kumu-mua=1.0" >
- </head>
- <kino>
- <h1> Aloha, honua! </h1>
- <script src = "https://code.jquery.com/jquery.js" ></script>
- </kino>
- </html>
No ka hana ʻana i kēia ʻano hoʻohālikelike Bootstrapped , e hoʻopili wale i nā faila CSS a me JS kūpono:
- <!DOCTYPE html>
- <html>
- <poʻo>
- <title> Bootstrap 101 Template </title>
- <meta name = "viewport" maʻiʻo = "ākea=ākea-ākea, kumu-mua=1.0" >
- <!-- Bootstrap -->
- <link href = "css/bootstrap.min.css" rel = "stylesheet" media = "screen" >
- </head>
- <kino>
- <h1> Aloha, honua! </h1>
- <script src = "https://code.jquery.com/jquery.js" ></script>
- <script src = "js/bootstrap.min.js" ></script>
- </kino>
- </html>
A ua hoʻonohonoho ʻoe! Me kēlā mau faila ʻelua i hoʻohui ʻia, hiki iā ʻoe ke hoʻomaka e hoʻomohala i kahi pūnaewele a i ʻole noi me Bootstrap.
E neʻe ma waho o ke kumu hoʻohālike me kekahi mau laʻana hoʻolālā. Paipai mākou i nā poʻe e hoʻomau i kēia mau hiʻohiʻona a ʻaʻole hoʻohana wale iā lākou i hopena hopena.
He palapala HTML barebones me nā Bootstrap CSS a me JavaScript.
E hōʻike ana i kahi pūʻulu koa no kahi memo mua a me ʻekolu mau mea kākoʻo.
E hoʻohana i kā mākou ʻōnaehana hoʻoheheʻe wai hou e hana i kahi hoʻolālā wai ʻole.
ʻO ka laʻana kūʻai māmā a māmā no nā papahana liʻiliʻi a i ʻole nā hui.
ʻO ka ʻaoʻao kūʻai aku me nā loulou hoʻokele like-ākea ma kahi navbar i hoʻololi ʻia.
Hoʻopaʻa inoa ʻo Barebones i ke ʻano me nā mana maʻamau, ʻoi aku ka nui a me kahi hoʻolālā maʻalahi.
E hoʻopaʻa i kahi kapuaʻi kiʻekiʻe paʻa i lalo o ka puka nānā o ka mea hoʻohana.
ʻO kahi riff hou aʻe ma ke kahua kūʻai kumu e hōʻike ana i kahi carousel kaulana.
E poʻo i nā docs no ka ʻike, nā laʻana, a me nā snippets code, a i ʻole e lawe i ka lele aʻe a hoʻopilikino iā Bootstrap no kekahi papahana e hiki mai ana.
E kipa i nā palapala Bootstrap Hoʻopilikino i ka Bootstrap