Bootstrap, ho tsoa ho Twitter

Bootstrap ke sesebelisoa se tsoang ho Twitter se etselitsoeng ho qala nts'etsopele ea lisebelisoa tsa marang-rang le libaka.
E kenyelletsa base CSS le HTML bakeng sa typography, liforomo, likonopo, litafole, grids, navigation, le tse ling.

Tlhokomeliso ea Nerd: Bootstrap e hahiloe ka Less mme e etselitsoe ho sebetsa kantle ho heke ho nahanoa ka libatli tsa sejoale-joale.

Ho hokahanya le CSS

Bakeng sa ho qala ka potlako le ka mokhoa o bonolo, kopitsa feela poleloana ena leqepheng la hau la tepo.

E sebedise ka Tlase

Na u rata ho sebelisa Less? Ha ho na bothata, kopanya feela repo mme u kenye mela ena:

Fork ho GitHub

Khoasolla, fereko, hula, litaba tsa faele, le tse ling ka repo ea semmuso ea Bootstrap ho Github.

Bootstrap ho GitHub »

Histori

Matsatsing a pejana a Twitter, baenjiniere ba ne ba sebelisa laebrari efe kapa efe eo ba e tloaetseng ho fihlela litlhoko tsa pele. Bootstrap e qalile e le karabo ea liqholotso tse hlahisitsoeng le nts'etsopele e potlakileng nakong ea Hackweek ea pele ea Twitter.

Ka thuso le maikutlo a baenjiniere ba bangata ba Twitter, Bootstrap e holile haholo ho kenyelletsa eseng feela mekhoa ea mantlha, empa le mekhoa e metle le e tšoarellang ea meralo e ka pele.

Bala haholoanyane ho dev.twitter.com ›

Tšehetso ea sebatli

Bootstrap e lekoa le ho tšehetsoa ho libatli tse kholo tsa sejoale-joale tse kang Chrome, Safari, Internet Explorer le Firefox.

E lekoa le ho tšehetsoa ho Chrome, Safari, Internet Explorer, le Firefox
  • Safari ea morao-rao
  • Google Chrome ea morao-rao
  • Firefox 4+
  • Internet Explorer 7+
  • Opera 11

Se kenyellelitsoeng

Bootstrap e tla e phethehile ka CSS e hlophisitsoeng, e sa kopanngoang, le litempele tsa mohlala.

  • Lifaele tsohle tsa mantlha tsa .less
  • CSS e hlophisitsoeng ka botlalo le e ntlafalitsoeng
  • Litokomane tse felletseng tsa styleguide
  • Mohlala oa leqephe la template (tse ling li tla tla haufinyane)

Gridi ea kamehla

Sistimi ea grid ea kamehla e fanoeng e le karolo ea Bootstrap ke gridi e bophara ba 16-column ea 940px. Ke tatso ea sistimi e tsebahalang ea grid ea 960, empa ntle le marang-rang / padding ka lehlakoreng le letšehali le le letona.

Mohlala oa marang-rang

Joalokaha ho bontšitsoe mona, moralo oa motheo o ka etsoa ka "likholomo" tse peli, e 'ngoe le e' ngoe e nka palo ea litšiea tse 16 tseo re li hlalositseng e le karolo ea tsamaiso ea rona ea marang-rang. Sheba mehlala e ka tlase bakeng sa mefuta e meng e fapaneng.

  1. <div class = "row" >
  2. <div class = "span6 columns" >
  3. ...
  4. </ div>
  5. <div class = "span10 columns" >
  6. ...
  7. </ div>
  8. </ div>
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
2
2
2
3
3
3
3
3
1
4
4
4
4
1/3
1/3
1/3
1/3
2/3
4
6
6
8
8
5
11
16

Litšiea tsa offsetting

4
8 ho ​​tloha 4
1/3 fokotsa 2/3s
4 tlhophiso 4
4 tlhophiso 4
5 tlhophiso 3
5 tlhophiso 3
10 ho tloha 6

Sebopeho se tsitsitseng

Sebopeho sa kamehla le se bonolo sa 940px-wide, se bohareng bakeng sa sebaka sa marang-rang sefe kapa sefe kapa leqephe le fanoeng ke <div.container>.

  1. <'mele>
  2. <div class = "setshelo" >
  3. ...
  4. </ div>
  5. </ mmele>

Sebopeho sa mokelikeli

Sebopeho se seng, se feto-fetohang sa leqephe le nang le min- le max-widths le karolo e ka letsohong le letšehali. E loketse lisebelisoa le litokomane.

  1. <'mele>
  2. <div class = "container-fluid" >
  3. <div class = "sidebar" >
  4. ...
  5. </ div>
  6. <div class = "dikahare" >
  7. ...
  8. </ div>
  9. </ div>
  10. </ mmele>

Lihlooho & kopi

Lethathamo le tloaelehileng la typographic bakeng sa ho hlophisa maqephe a hau a tepo.

Lenane lohle la typographic le thehiloe holim'a mefuta e 'meli e Menyenyane faeleng ea rona ea preboot.less: @basefontle @baseline. Ea pele ke boholo ba fonte e sebelisoang hohle 'me ea bobeli ke bophahamo ba mohala.

Re sebelisa mefuta-futa eo, le lipalo tse ling, ho theha marang-rang, li-padding, le bophahamo ba mela ea mefuta eohle ea rona le tse ling.

h1. Sehlooho sa 1

h2. Sehlooho sa 2

h3. Sehlooho sa 3

h4. Sehlooho sa 4

h5. Sehlooho sa 5
h6. Sehlooho sa 6

Serapa sa mohlala

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.

Sehloho sa mohlala Se na le sehloohoana...

Tse ling likarolo

Ho sebelisoa khatiso, liaterese le khutsufatso

<strong> <em> <address> <abbr>

Nako ea ho sebelisoa

Li-tag tsa khatiso ( <strong>le <em>) li lokela ho sebelisoa ho bontša bohlokoa bo eketsehileng kapa khatiso ea lentsoe kapa poleloana e amanang le kopi e potolohileng eona. Sebelisa <strong>bakeng sa bohlokoa le <em>bakeng sa ho hatisa khatello .

Ho hatisoa serapeng

Fusce dapibus , tellus ac cursus commodo , tor mauris condimentum nibh , ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, pharetra augue.

Tlhokomeliso: Ho ntse ho lokile ho sebelisa <b>le <i>li-tag ho HTML5 'me ha ho hlokahale hore li ngotsoe ka sebete le ka mongolo o tšekaletseng, ka ho latellana (leha ho na le karolo ea semantic, e sebelise). <b>e reretsoe ho totobatsa mantsoe kapa lipoleloana ntle le ho fana ka bohlokoa bo eketsehileng, athe <i>hangata e le ea lentsoe, mantsoe a theknoloji, joalo-joalo.

Liaterese

The <address>element e sebelisetsoa tlhahisoleseling bakeng sa moholo-holo oa eona ea haufi, kapa sehlopha sohle sa mosebetsi. Mona ke kamoo e shebahalang kateng:

Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890

Tlhokomeliso: Mola o mong le o mong o <address>tlameha ho qetella ka ho khaoha ( <br />) kapa o phuthetsoe ka lebokose la "block-level" (mohlala, <p>) ho hlophisa litaba hantle.

Likgutsufatso

Bakeng sa khutsufatso le li-acronyms, sebelisa <abbr>tag ( <acronym>e tlositsoe ho HTML5 ). Beha foromo e khuts'oane ka har'a tag ebe u beha sehlooho sa lebitso le felletseng.

Mantsoe a thibelang

<blockquote> <p> <small>

Mokhoa oa ho qotsa

Ho kenyelletsa blockquote, thatela <blockquote>hohle <p>le <small>li-tag. Sebelisa <small>element ho qotsa mohloli oa hau mme o tla fumana lebelo la em &mdash;pele ho lona.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat ante venenatis dapibus posuere velit aliquet.

Ngaka Julius Hibbert

Manane

Ha ea laeloa<ul>

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem le massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Likokoana-hloko tsa Purus sodales
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Unstyled<ul.unstyled>

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem le massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Likokoana-hloko tsa Purus sodales
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

E laetsoe<ol>

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem le massa
  4. Facilisis in pretium nisl aliquet
  5. Nulla volutpat aliquam velit
  6. Faucibus porta lacus fringilla vel
  7. Aenean sit amet erat nunc
  8. Eget porttitor lorem

Tlhalosodl

Manane a tlhaloso
Lethathamo la litlhaloso le nepahetse bakeng sa ho hlalosa mantsoe.
Euismod
Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
Donec id elit non mi porta gravida at eget metus.
Malesuada porta
Etiam porta sem malesuada magna mollis euismod.

Ho aha litafole

<table> <thead> <tbody> <tr> <th> <td> <colspan> <caption>

Litafole li ntle - bakeng sa lintho tse ngata. Litafole tse kholo, leha ho le joalo, li hloka lerato la "markup" hore le be molemo, le fokotsehe, 'me le balehe (boemong ba khoutu). Litlhahiso tse 'maloa tse ka u thusang ke tsena.

Ka linako tsohle phuthela lihlooho tsa kholomo ea hau ka tsela <thead>eo bolaoli bo leng teng <thead>> <tr>> <th>.

Joalo ka lihlooho tsa kholomo, litaba tsohle tsa 'mele oa tafole ea hau li lokela ho koaheloa ka hore sehlopha sa <tbody>hau sa maemo ke <tbody>> <tr>> <td>.

Mohlala: Mekhoa ea litafole ea kamehla

Litafole tsohle li tla etsoa ka mokhoa oa boiketsetso ka meeli ea bohlokoa feela ho netefatsa hore li balehe le ho boloka sebopeho. Ha ho hlokahale ho eketsa litlelase kapa litšobotsi tse ling.

# Lebitso la pele Fane Puo
1 Ba bang E 'ngoe Senyesemane
2 Joe Sixpack Senyesemane
3 Stu Sebono Khoutu
  1. <tafole>
  2. ...
  3. </tafole>

Mohlala: Qoaha e metsero

Fumana monate ka litafole tsa hau ka ho eketsa liqoaha-tsenya .zebra-stripedsehlopha.

# Lebitso la pele Fane Puo
1 Ba bang E 'ngoe Senyesemane
2 Joe Sixpack Senyesemane
3 Stu Sebono Khoutu

Tlhokomeliso: Zebra-striping ke ntlafatso e tsoelang pele ha e fumanehe bakeng sa libatli tsa khale joalo ka IE8 le ka tlase.

  1. < sehlopha sa tafole = "zebra-striped" >
  2. ...
  3. </tafole>

Mohlala: Zebra-striped w/ TableSorter.js

Ho nka mohlala o fetileng, re ntlafatsa molemo oa litafole tsa rona ka ho fana ka ts'ebetso ea ho hlophisa ka jQuery le plugin ea Tablesorter . Tobetsa sehlooho sa kholomo efe kapa efe ho fetola mofuta.

# Lebitso la pele Fane Puo
1 Hao E 'ngoe Senyesemane
2 Joe Sixpack Senyesemane
3 Stu Sebono Khoutu
  1. <script src = "js/jquery/jquery.tablesorter.min.js" ></script>
  2. <script >
  3. $ ( mosebetsi () {
  4. $ ( "tafole#sortTableExample" ). tablesorter ({ sortList : [[ 1 , 0 ]] });
  5. });
  6. </script>
  7. < sehlopha sa tafole = "zebra-striped" >
  8. ...
  9. </tafole>

Mekhoa ea kamehla

Liforomo tsohle li fuoa mekhoa e sa lekanyetsoang ho li hlahisa ka mokhoa o balehang le o qhekellang. Litaele li fanoe bakeng sa ho kenya mongolo, ho khetha manane, libaka tsa mongolo, likonopo tsa seea-le-moea le li-checkbox, le likonopo.

Tšōmo ea sebopeho sa mohlala
Boleng bo itseng Mona
Sekhechana se senyane sa mongolo oa thuso
Tšōmo ea sebopeho sa mohlala
@
Tšōmo ea sebopeho sa mohlala
Tlhokomeliso: Li-labels li pota-potile likhetho tsohle bakeng sa libaka tse kholoanyane tsa ho tobetsa le foromo e sebetsang haholoanyane.
ho Linako tsohle li hlahisoa e le Nako e Tloaelehileng ea Pacific (GMT -08:00).
Sengoloa sa thuso se hlalosang karolo e kaholimo ha ho hlokahala.
 

Liforomo tse pakiloeng

Eketsa .form-stackedho HTML ea foromo ea hau 'me u tla ba le lileibole ka holim'a masimo a tsona ho fapana le ho le letšehali. Sena se sebetsa hantle haeba liforomo tsa hau li le khuts'oane kapa u na le mela e 'meli ea litlatsetso bakeng sa liforomo tse boima.

Tšōmo ea sebopeho sa mohlala
Tšōmo ea sebopeho sa mohlala
Sekhechana se senyane sa mongolo oa thuso
Tlhokomeliso: Li-labels li pota-potile likhetho tsohle bakeng sa libaka tse kholoanyane tsa ho tobetsa le foromo e sebetsang haholoanyane.
 

Likonopo

Joalo ka kopano, likonopo li sebelisetsoa liketso ha lihokelo li sebelisetsoa lintho. Mohlala, "Khoasolla" e ka ba konopo mme "ts'ebetso ea morao-rao" e ka ba sehokelo.

Likonopo tsohle li ikamahanya le setaele se boputsoa bo bobebe, empa ho ka sebelisoa lihlopha tse 'maloa tse sebetsang bakeng sa mefuta e fapaneng ea mebala. Lihlopha tsena li kenyelletsa sehlopha sa 'mala o moputsoa .primary, ​​​​boputsoa bo khanyang .info, sehlopha se setala .success, le sehlopha se sefubelu .danger. Ho feta moo, ho roala setaele sa hau ho bonolo.

Likonopo tsa mohlala

Mefuta ea likonopo e ka sebelisoa ho eng kapa eng e .btnsebelisitsoeng. Ka tloaelo u tla batla ho sebelisa tsena feela ho <a>, <button>, le ho khetha <input>likarolo. Mona ke kamoo e shebahalang kateng:

       

Mefuta e fapaneng

U batla likonopo tse kholoanyane kapa tse nyane? E be le eona!

Boemo ba bokooa

Bakeng sa likonopo tse sa sebetseng kapa tse koetsoeng ke sesebelisoa ka mabaka a mang, sebelisa boemo ba batho ba holofetseng. Ke tsa .disabledlihokelo le :disabledtsa <button>likarolo.

Lihokelo

Likonopo

 

Litemoso tsa mantlha

div.alert-message

Melaetsa ea mola o le mong bakeng sa ho totobatsa ho hloleha, ho hloleha ho ka bang teng, kapa katleho ea ketso. E bohlokoa haholo bakeng sa liforomo.

×

guacamole e halalelang! Ke hantle hore u itlhahlobe, ha u shebahale hantle haholo.

×

Oho hang! Fetola sena le sane ebe o leka hape.

×

Mosebetsi o motle! U atlehile ho bala molaetsa ona oa tlhokomeliso.

×

Hlokomela! Ena ke tlhokomeliso e hlokang tlhokomelo ea hau, empa ha se taba ea bohlokoa haholo hajoale.

Thibela melaetsa

div.alert-message.block-message

Bakeng sa melaetsa e hlokang tlhaloso e fokolang, re na le litlhokomeliso tsa mokhoa oa lirapa. Tsena li nepahetse bakeng sa ho fana ka melaetsa e telele ea liphoso, ho lemosa mosebelisi ka ketso e sa lebelloang, kapa ho hlahisa tlhahisoleseling bakeng sa khatiso e eketsehileng leqepheng.

×

guacamole e halalelang! Ena ke temoso! Ke hantle hore u itlhahlobe, ha u shebahale hantle haholo. Nulla vitae elit libero, pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

×

Oho hang! O na le phoso! Fetola sena le sane ebe o leka hape. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

×

Mosebetsi o motle! U atlehile ho bala molaetsa ona oa tlhokomeliso. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas faucibus mollis interdum.

×

Hlokomela! Ena ke tlhokomeliso e hlokang tlhokomelo ea hau, empa ha se taba ea bohlokoa haholo hajoale.

Mekhoa e metle

Li-modals-dialogs kapa lightboxes-li ntle bakeng sa liketso tsa maemo maemong ao ho leng bohlokoa hore maemo a ka morao a bolokehe.

Tool Tips

Li-Twipsies li bohlokoa haholo ho thusa mosebelisi ea ferekaneng le ho ba supa tseleng e nepahetseng.

Lorem ipsum dolar sit amet illo error ipsum veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. Voluptasdicta eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt sed dictaum quae voluptam quart quae accusantium accusantium totam architecto explicabo sit quasi fugit fugit .

ka tlase!
hantle!
tloha!
holimo!

Bafutsana

Sebelisa li-popovers ho fana ka lintlha tse tlase ho leqephe ntle le ho ama sebopeho.

Sehlooho sa Popover

Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum le eros.

Bootstrap e hahiloe ka Preboot , pakete e bulehileng ea li-mixins le mefuta e fapaneng e lokelang ho sebelisoa hammoho le Less , CSS preprocessor bakeng sa tsoelo-pele ea websaete e potlakileng le e bonolo.

Sheba hore na re sebelisitse Preboot joang ho Bootstrap le hore na u ka e sebelisa joang ha u ka khetha ho sebetsa ka tlase ho projeke ea hau e latelang.

Mokhoa oa ho e sebelisa

Sebelisa khetho ena ho sebelisa ka botlalo mefuta-futa ea Bootstrap's Less Less, metsoako, le nesting ho CSS ka javascript ho sebatli sa hau.

  1. <link rel = "stylesheet/less" href = "less/bootstrap.less" media = "tsohle" />
  2. <script src = "js/less-1.1.3.min.js" > </script>

Ha u utloe tharollo ea .js? Leka sesebelisoa sa Less Mac kapa sebelisa Node.js ho bokella ha o tsamaisa khoutu ea hau.

Se kenyellelitsoeng

Mona ke tse ling tsa lintlha-khōlō tsa se kenyellelitsoeng ho Twitter Bootstrap e le karolo ea Bootstrap. E fetela ho webosaete ea Bootstrap kapa leqephe la projeke ea Github ho jarolla le ho ithuta haholoanyane.

Lintho tse fapaneng

Liphetoho ho tse Nyenyane li nepahetse bakeng sa ho boloka le ho nchafatsa hlooho ea hau ea CSS mahala. Ha u batla ho fetola boleng ba 'mala kapa boleng bo sebelisoang khafetsa, e nchafatse sebakeng se le seng 'me u sete.

  1. // Lihokelo
  2. @linkColor : #8b59c2;
  3. @linkColorHover : fifala ( @linkColor , 10 );
  4.  
  5. // Meputsoana
  6. @batsho : #000;
  7. @grayDark : khantša ( @black , 25 %);
  8. @gray : khantša ( @black , 50 %);
  9. @grayLight : khantša ( @black , 70 %);
  10. @grayLighter : khantša ( @black , 90 %);
  11. @tšoeu : #fff ;
  12.  
  13. // Mebala ya Puo
  14. @putsoa : #08b5fb;
  15. @tala : #46a546;
  16. @khubelu : #9d261d;
  17. @mosehla : #ffc40d;
  18. @orange : #f89406;
  19. @pinki : #c3325f;
  20. @pherese : #7a43b6;
  21.  
  22. // Keriti ya motheo
  23. @basefont : 13px ;
  24. @baseline : 18px ;

Ho fana ka maikutlo

Less e boetse e fana ka mokhoa o mong oa ho fana ka maikutlo ho phaella ho /* ... */syntax e tloaelehileng ea CSS.

  1. // Ena ke tlhaloso
  2. /* Hona hape ke maikutlo */

E kopanya "wazoo".

Li-mixins ha e le hantle li kenyelletsa kapa likaroloana tsa CSS, li u lumella ho kopanya boloko ba khoutu ho e le 'ngoe. Li ntle bakeng sa thepa e kentsoeng pele ea barekisi joalo ka box-shadow, li-gradients tsa sebatli, mekotla ea litlhaku, le tse ling. Ka tlase ke mohlala oa li-mixins tse kenyellelitsoeng le Bootstrap.

Melato ea litlhaku

  1. #mongolo {
  2. . shorthand ( @weight : normal , @size : 14px , @lineHeight : 20px ) {
  3. boholo ba mongolo : @size ;
  4. fonte - boima : @weight ;
  5. mola - bophahamo : @lineHeight ;
  6. }
  7. . sans - serif ( @weight : normal , @size : 14px , @lineHeight : 20px ) {
  8. font - lelapa : "Helvetica Neue" , ​​Helvetica , Arial , sans - serif ;
  9. boholo ba mongolo : @size ;
  10. fonte - boima : @weight ;
  11. mola - bophahamo : @lineHeight ;
  12. }
  13. . serif ( @weight : normal , @size : 14px , @lineHeight : 20px ) {
  14. font - family : "Georgia" , Times New Roman , Times , sans - serif ;
  15. boholo ba mongolo : @size ;
  16. fonte - boima : @weight ;
  17. mola - bophahamo : @lineHeight ;
  18. }
  19. . monospace ( @weight : normal , @size : 12px , @lineHeight : 20px ) {
  20. font - family : "Monaco" , Courier New , monospace ;
  21. boholo ba mongolo : @size ;
  22. fonte - boima : @weight ;
  23. mola - bophahamo : @lineHeight ;
  24. }
  25. }

Gradients

  1. #gradient {
  2. . rapama ( @startColor : #555, @endColor: #333) {
  3. bokamorao - mmala : @endColor ;
  4. bokamorao - pheta-pheta : pheta - x ;
  5. bokamorao - setšoantšo : - khtml - gradient ( linear , left top , right top , ho tloha ( @startColor ), ho ea ( @endColor )); // Mokgosi
  6. bokamorao - setšoantšo : - moz - linear - gradient ( le letšehali , @startColor , @endColor ); // FF 3.6+
  7. bokamorao - setšoantšo : - ms - linear - gradient ( ka ho le letšehali , @startColor , @endColor ); // IE10
  8. bokamorao - setšoantšo : - webkit - gradient ( linear , holimo ka ho le letšehali, holimo ka ho le letona , 'mala - emisa ( 0 %, @startColor ), mmala - emisa ( 100 %, @endColor )); // Safari 4+, Chrome 2+
  9. bokamorao - setšoantšo : - webkit - linear - gradient ( le letšehali , @startColor , @endColor ); // Safari 5.1+, Chrome 10+
  10. bokamorao - setšoantšo : - o - linear - gradient ( le letšehali , @startColor , @endColor ); // Opera 11.10
  11. bokamorao - setšoantšo : linear - gradient ( left , @startColor , @endColor ); // Le standard
  12. }
  13. . e thethehileng ( @startColor : #555, @endColor: #333) {
  14. bokamorao - mmala : @endColor ;
  15. bokamorao - pheta-pheta : pheta - x ;
  16. bokamorao - setšoantšo : - khtml - gradient ( linear , left top , left bottom , ho tloha ( @startColor ), ho ea ( @endColor )); // Mokgosi
  17. bokamorao - setšoantšo : - moz - linear - gradient ( @startColor , @endColor ); // FF 3.6+
  18. bokamorao - setšoantšo : - ms - linear - gradient ( @startColor , @endColor ); // IE10
  19. bokamorao - setšoantšo : - webkit - gradient ( linear , holimo ka ho le letšehali , tlase ka ho le letšehali , mmala - emisa ( 0 %, @startColor ), mmala - emisa ( 100 %, @endColor )); // Safari 4+, Chrome 2+
  20. bokamorao - setšoantšo : - webkit - linear - gradient ( @startColor , @endColor ); // Safari 5.1+, Chrome 10+
  21. bokamorao - setšoantšo : - o - linear - gradient ( @startColor , @endColor ); // Opera 11.10
  22. bokamorao - setšoantšo : linear - gradient ( @startColor , @endColor ); // Boemo
  23. }
  24. . tataiso ( @startColor : #555, @endColor: #333, @deg: 45deg) {
  25. ...
  26. }
  27. . e emeng - e meraro - mebala ( @startColor : #00b3ee, @midColor: #7a43b6, @colorStop: 50%, @endColor: #c3325f) {
  28. ...
  29. }
  30. }

Ts'ebetso le sistimi ea grid

E-ba majabajaba 'me u etse lipalo ho hlahisa metsoako e tenyetsehang le e matla joalo ka e ka tlase.

  1. // Bokgale
  2. @gridColumns : 16 ;
  3. @gridColumnWidth : 40px ;
  4. @gridGutterWidth : 20px ;
  5. @siteWidth : ( @gridColumns * @gridColumnWidth ) + ( @gridGutterWidth * ( @gridColumns - 1 ));
  6.  
  7. // Sistimi ea Grid
  8. . setshelo {
  9. bophara : @siteWidth ;
  10. moeli : 0 auto ;
  11. . clearfix ();
  12. }
  13. . likholomo ( @columnSpan : 1 ) {
  14. bophara : ( @gridColumnWidth * @columnSpan ) + ( @gridGutterWidth * ( @columnSpan - 1 ));
  15. }
  16. . offset ( @columnOffset : 1 ) {
  17. margin - ka ho le letšehali : ( @gridColumnWidth * @columnOffset ) + ( @gridGutterWidth * ( @columnOffset - 1 )) + @extraSpace ;
  18. }