મુખ્ય સામગ્રી પર જાઓ ડૉક્સ નેવિગેશન પર જાઓ
in English

ટાઇપોગ્રાફી

બુટસ્ટ્રેપ ટાઇપોગ્રાફી માટે દસ્તાવેજીકરણ અને ઉદાહરણો, જેમાં વૈશ્વિક સેટિંગ્સ, હેડિંગ, મુખ્ય ટેક્સ્ટ, સૂચિઓ અને વધુનો સમાવેશ થાય છે.

વૈશ્વિક સેટિંગ્સ

બુટસ્ટ્રેપ મૂળભૂત વૈશ્વિક પ્રદર્શન, ટાઇપોગ્રાફી અને લિંક શૈલીઓ સેટ કરે છે. જ્યારે વધુ નિયંત્રણની જરૂર હોય, ત્યારે ટેક્સ્ટ ઉપયોગિતા વર્ગો તપાસો .

  • મૂળ ફોન્ટ સ્ટેકનો ઉપયોગ કરો જે font-familyદરેક OS અને ઉપકરણ માટે શ્રેષ્ઠ પસંદ કરે છે .
  • વધુ સમાવિષ્ટ અને સુલભ પ્રકાર સ્કેલ માટે, અમે બ્રાઉઝરના ડિફોલ્ટ રૂટ font-size(સામાન્ય રીતે 16px) નો ઉપયોગ કરીએ છીએ જેથી મુલાકાતીઓ તેમના બ્રાઉઝર ડિફોલ્ટને જરૂરિયાત મુજબ કસ્ટમાઇઝ કરી શકે.
  • $font-family-baseઅમારા ટાઇપોગ્રાફિક આધાર તરીકે , $font-size-base, અને $line-height-baseવિશેષતાઓનો ઉપયોગ કરો <body>.
  • દ્વારા વૈશ્વિક લિંક રંગ સેટ કરો $link-color.
  • પર $body-bgસેટ કરવા માટે ઉપયોગ કરો ( મૂળભૂત રીતે).background-color<body>#fff

આ શૈલીઓ અંદર મળી શકે છે _reboot.scss, અને વૈશ્વિક ચલો માં વ્યાખ્યાયિત થયેલ છે _variables.scss. $font-size-baseમાં સેટ કરવાની ખાતરી કરો rem.

હેડિંગ

તમામ HTML શીર્ષકો, <h1>મારફતે <h6>, ઉપલબ્ધ છે.

મથાળું ઉદાહરણ
<h1></h1> h1. બુટસ્ટ્રેપ હેડિંગ
<h2></h2> h2. બુટસ્ટ્રેપ હેડિંગ
<h3></h3> h3. બુટસ્ટ્રેપ હેડિંગ
<h4></h4> h4. બુટસ્ટ્રેપ હેડિંગ
<h5></h5> h5. બુટસ્ટ્રેપ હેડિંગ
<h6></h6> h6. બુટસ્ટ્રેપ હેડિંગ
<h1>h1. Bootstrap heading</h1>
<h2>h2. Bootstrap heading</h2>
<h3>h3. Bootstrap heading</h3>
<h4>h4. Bootstrap heading</h4>
<h5>h5. Bootstrap heading</h5>
<h6>h6. Bootstrap heading</h6>

.h1દ્વારા .h6વર્ગો પણ ઉપલબ્ધ છે, જ્યારે તમે મથાળાની ફોન્ટ સ્ટાઇલ સાથે મેચ કરવા માંગો છો પરંતુ સંકળાયેલ HTML તત્વનો ઉપયોગ કરી શકતા નથી.

h1. બુટસ્ટ્રેપ હેડિંગ

h2. બુટસ્ટ્રેપ હેડિંગ

h3. બુટસ્ટ્રેપ હેડિંગ

h4. બુટસ્ટ્રેપ હેડિંગ

h5. બુટસ્ટ્રેપ હેડિંગ

h6. બુટસ્ટ્રેપ હેડિંગ

<p class="h1">h1. Bootstrap heading</p>
<p class="h2">h2. Bootstrap heading</p>
<p class="h3">h3. Bootstrap heading</p>
<p class="h4">h4. Bootstrap heading</p>
<p class="h5">h5. Bootstrap heading</p>
<p class="h6">h6. Bootstrap heading</p>

હેડિંગ કસ્ટમાઇઝ કરી રહ્યા છીએ

બુટસ્ટ્રેપ 3 માંથી નાના ગૌણ હેડિંગ ટેક્સ્ટને ફરીથી બનાવવા માટે સમાવિષ્ટ ઉપયોગિતા વર્ગોનો ઉપયોગ કરો.

ફેન્સી ડિસ્પ્લે હેડિંગ ઝાંખા ગૌણ ટેક્સ્ટ સાથે

<h3>
  Fancy display heading
  <small class="text-muted">With faded secondary text</small>
</h3>

ડિસ્પ્લે હેડિંગ

પરંપરાગત મથાળાના ઘટકો તમારા પૃષ્ઠની સામગ્રીના માંસમાં શ્રેષ્ઠ રીતે કાર્ય કરવા માટે રચાયેલ છે. જ્યારે તમને અલગ થવા માટે મથાળાની જરૂર હોય, ત્યારે ડિસ્પ્લે હેડિંગનો ઉપયોગ કરવાનું વિચારો - એક મોટી, થોડી વધુ અભિપ્રાયવાળી હેડિંગ શૈલી.

ડિસ્પ્લે 1
ડિસ્પ્લે 2
ડિસ્પ્લે 3
ડિસ્પ્લે 4
ડિસ્પ્લે 5
ડિસ્પ્લે 6
<h1 class="display-1">Display 1</h1>
<h1 class="display-2">Display 2</h1>
<h1 class="display-3">Display 3</h1>
<h1 class="display-4">Display 4</h1>
<h1 class="display-5">Display 5</h1>
<h1 class="display-6">Display 6</h1>

ડિસ્પ્લે હેડિંગને $display-font-sizesSass મેપ અને બે વેરીએબલ દ્વારા ગોઠવવામાં આવે છે, $display-font-weightઅને $display-line-height.

$display-font-sizes: (
  1: 5rem,
  2: 4.5rem,
  3: 4rem,
  4: 3.5rem,
  5: 3rem,
  6: 2.5rem
);

$display-font-weight: 300;
$display-line-height: $headings-line-height;

લીડ

એક ફકરો ઉમેરીને અલગ બનાવો .lead.

આ મુખ્ય ફકરો છે. તે નિયમિત ફકરાઓથી અલગ છે.

<p class="lead">
  This is a lead paragraph. It stands out from regular paragraphs.
</p>

ઇનલાઇન ટેક્સ્ટ ઘટકો

સામાન્ય ઇનલાઇન HTML5 તત્વો માટે સ્ટાઇલ.

તમે માર્ક ટેગનો ઉપયોગ કરી શકો છોહાઇલાઇટટેક્સ્ટ

ટેક્સ્ટની આ લાઇનનો અર્થ કાઢી નાખેલ ટેક્સ્ટ તરીકે ગણવામાં આવે છે.

ટેક્સ્ટની આ પંક્તિનો અર્થ એ છે કે તે હવે સચોટ નથી.

ટેક્સ્ટની આ પંક્તિને દસ્તાવેજમાં વધારા તરીકે ગણવામાં આવે છે.

ટેક્સ્ટની આ લાઇન રેખાંકિત તરીકે રેન્ડર થશે.

ટેક્સ્ટની આ લાઇનને ફાઇન પ્રિન્ટ તરીકે ગણવામાં આવે છે.

આ લાઇન બોલ્ડ ટેક્સ્ટ તરીકે રેન્ડર કરવામાં આવી છે.

આ લાઇન ઇટાલિક લખાણ તરીકે પ્રસ્તુત છે.

<p>You can use the mark tag to <mark>highlight</mark> text.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
<p><u>This line of text will render as underlined.</u></p>
<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>

સાવચેત રહો કે તે ટૅગ્સનો ઉપયોગ સિમેન્ટીક હેતુ માટે થવો જોઈએ:

  • <mark>ટેક્સ્ટનું પ્રતિનિધિત્વ કરે છે જે સંદર્ભ અથવા સંકેત હેતુ માટે ચિહ્નિત અથવા પ્રકાશિત થયેલ છે.
  • <small>કૉપિરાઇટ અને કાનૂની ટેક્સ્ટ જેવી બાજુ-ટિપ્પણીઓ અને નાની પ્રિન્ટ રજૂ કરે છે.
  • <s>તત્વનું પ્રતિનિધિત્વ કરે છે જે હવે સંબંધિત નથી અથવા હવે સચોટ નથી.
  • <u>ઇનલાઇન ટેક્સ્ટના ગાળાને રજૂ કરે છે જે એવી રીતે રેન્ડર થવો જોઈએ જે સૂચવે છે કે તેમાં બિન-ટેક્સ્ટ્યુઅલ ટીકા છે.

જો તમે તમારા ટેક્સ્ટને સ્ટાઇલ કરવા માંગો છો, તો તમારે તેના બદલે નીચેના વર્ગોનો ઉપયોગ કરવો જોઈએ:

  • .markજેવી જ શૈલીઓ લાગુ કરશે <mark>.
  • .smallજેવી જ શૈલીઓ લાગુ કરશે <small>.
  • .text-decoration-underlineજેવી જ શૈલીઓ લાગુ કરશે <u>.
  • .text-decoration-line-throughજેવી જ શૈલીઓ લાગુ કરશે <s>.

ઉપર બતાવેલ ન હોવા છતાં, નિઃસંકોચ ઉપયોગ કરો <b>અને <i>HTML5 માં. <b>વધારાના મહત્વ દર્શાવ્યા વિના શબ્દો અથવા શબ્દસમૂહોને પ્રકાશિત કરવા માટે છે, જ્યારે <i>મોટે ભાગે અવાજ, તકનીકી શબ્દો વગેરે માટે છે.

ટેક્સ્ટ ઉપયોગિતાઓ

અમારી ટેક્સ્ટ યુટિલિટીઝ અને કલર યુટિલિટીઝ સાથે ટેક્સ્ટ ગોઠવણી, રૂપાંતર, શૈલી, વજન, રેખા-ઊંચાઈ, શણગાર અને રંગ બદલો .

સંક્ષેપ

<abbr>હોવર પર વિસ્તૃત સંસ્કરણ બતાવવા માટે સંક્ષેપ અને ટૂંકાક્ષરો માટે HTML ના તત્વનું શૈલીયુક્ત અમલીકરણ . સંક્ષિપ્ત શબ્દોમાં ડિફૉલ્ટ રેખાંકિત હોય છે અને હોવર પર અને સહાયક તકનીકોના વપરાશકર્તાઓને વધારાના સંદર્ભ પ્રદાન કરવા માટે મદદ કર્સર મેળવે છે.

.initialismથોડા નાના ફોન્ટ-સાઇઝ માટે સંક્ષેપમાં ઉમેરો .

attr

HTML

<p><abbr title="attribute">attr</abbr></p>
<p><abbr title="HyperText Markup Language" class="initialism">HTML</abbr></p>

બ્લોકક્વોટ્સ

તમારા દસ્તાવેજમાં અન્ય સ્ત્રોતમાંથી સામગ્રીના બ્લોક્સ ટાંકવા માટે. ક્વોટ તરીકે <blockquote class="blockquote">કોઈપણ HTML આસપાસ લપેટી .

બ્લોકક્વોટ તત્વમાં સમાયેલ એક જાણીતું ક્વોટ.

<blockquote class="blockquote">
  <p>A well-known quote, contained in a blockquote element.</p>
</blockquote>

સ્ત્રોતનું નામકરણ

HTML સ્પેક માટે જરૂરી છે કે બ્લોકક્વોટ એટ્રિબ્યુશન ની બહાર મૂકવામાં આવે <blockquote>. એટ્રિબ્યુશન પ્રદાન કરતી વખતે, તમારાને <blockquote>a માં લપેટો અને વર્ગ સાથે <figure>એક <figcaption>અથવા બ્લોક સ્તરના ઘટક (દા.ત., <p>) નો ઉપયોગ કરો .blockquote-footer. સાથે સાથે સ્ત્રોત કામ નામ લપેટી ખાતરી કરો <cite>.

બ્લોકક્વોટ તત્વમાં સમાયેલ એક જાણીતું ક્વોટ.

<figure>
  <blockquote class="blockquote">
    <p>A well-known quote, contained in a blockquote element.</p>
  </blockquote>
  <figcaption class="blockquote-footer">
    Someone famous in <cite title="Source Title">Source Title</cite>
  </figcaption>
</figure>

ગોઠવણી

તમારા બ્લોકક્વોટના સંરેખણને બદલવા માટે જરૂરિયાત મુજબ ટેક્સ્ટ ઉપયોગિતાઓનો ઉપયોગ કરો.

બ્લોકક્વોટ તત્વમાં સમાયેલ એક જાણીતું ક્વોટ.

<figure class="text-center">
  <blockquote class="blockquote">
    <p>A well-known quote, contained in a blockquote element.</p>
  </blockquote>
  <figcaption class="blockquote-footer">
    Someone famous in <cite title="Source Title">Source Title</cite>
  </figcaption>
</figure>

બ્લોકક્વોટ તત્વમાં સમાયેલ એક જાણીતું ક્વોટ.

<figure class="text-end">
  <blockquote class="blockquote">
    <p>A well-known quote, contained in a blockquote element.</p>
  </blockquote>
  <figcaption class="blockquote-footer">
    Someone famous in <cite title="Source Title">Source Title</cite>
  </figcaption>
</figure>

યાદીઓ

અનસ્ટાઇલ

list-styleયાદી વસ્તુઓ પર ડિફોલ્ટ અને ડાબો હાંસિયો દૂર કરો (ફક્ત તાત્કાલિક બાળકો માટે). આ ફક્ત તાત્કાલિક બાળકોની સૂચિ વસ્તુઓ પર લાગુ થાય છે , એટલે કે તમારે કોઈપણ નેસ્ટેડ સૂચિઓ માટે પણ વર્ગ ઉમેરવાની જરૂર પડશે.

  • આ એક યાદી છે.
  • તે સંપૂર્ણપણે અનસ્ટાઇલ દેખાય છે.
  • માળખાકીય રીતે, તે હજી પણ સૂચિ છે.
  • જો કે, આ શૈલી ફક્ત તાત્કાલિક બાળ તત્વોને લાગુ પડે છે.
  • નેસ્ટેડ યાદીઓ:
    • આ શૈલીથી પ્રભાવિત નથી
    • હજુ પણ બુલેટ બતાવશે
    • અને યોગ્ય ડાબો હાંસિયો ધરાવે છે
  • આ હજુ પણ કેટલીક પરિસ્થિતિઓમાં હાથમાં આવી શકે છે.
<ul class="list-unstyled">
  <li>This is a list.</li>
  <li>It appears completely unstyled.</li>
  <li>Structurally, it's still a list.</li>
  <li>However, this style only applies to immediate child elements.</li>
  <li>Nested lists:
    <ul>
      <li>are unaffected by this style</li>
      <li>will still show a bullet</li>
      <li>and have appropriate left margin</li>
    </ul>
  </li>
  <li>This may still come in handy in some situations.</li>
</ul>

ઇનલાઇન

સૂચિની બુલેટ્સ દૂર કરો અને marginબે વર્ગોના સંયોજન સાથે થોડો પ્રકાશ લાગુ કરો, .list-inlineઅને .list-inline-item.

  • આ એક સૂચિ આઇટમ છે.
  • અને અન્ય એક.
  • પરંતુ તેઓ ઇનલાઇન પ્રદર્શિત થાય છે.
<ul class="list-inline">
  <li class="list-inline-item">This is a list item.</li>
  <li class="list-inline-item">And another one.</li>
  <li class="list-inline-item">But they're displayed inline.</li>
</ul>

વર્ણન સૂચિ સંરેખણ

અમારી ગ્રીડ સિસ્ટમના પૂર્વવ્યાખ્યાયિત વર્ગો (અથવા સિમેન્ટીક મિક્સન્સ) નો ઉપયોગ કરીને શરતો અને વર્ણનોને આડા સંરેખિત કરો. લાંબા સમય માટે, તમે .text-truncateઅંડાકાર સાથે ટેક્સ્ટને કાપવા માટે વૈકલ્પિક રીતે એક વર્ગ ઉમેરી શકો છો.

વર્ણન યાદીઓ
વર્ણન સૂચિ શબ્દોને વ્યાખ્યાયિત કરવા માટે યોગ્ય છે.
મુદત

શબ્દ માટે વ્યાખ્યા.

અને કેટલાક વધુ પ્લેસહોલ્ડર વ્યાખ્યા ટેક્સ્ટ.

અન્ય શબ્દ
આ વ્યાખ્યા ટૂંકી છે, તેથી કોઈ વધારાના ફકરા અથવા કંઈપણ નથી.
કાપવામાં આવેલ શબ્દ કાપવામાં આવે છે
જ્યારે જગ્યા ચુસ્ત હોય ત્યારે આ ઉપયોગી થઈ શકે છે. અંતમાં લંબગોળ ઉમેરે છે.
માળો
નેસ્ટેડ વ્યાખ્યા યાદી
મેં સાંભળ્યું કે તમને વ્યાખ્યા યાદીઓ ગમે છે. ચાલો હું તમારી વ્યાખ્યા સૂચિની અંદર વ્યાખ્યા સૂચિ મૂકું.
<dl class="row">
  <dt class="col-sm-3">Description lists</dt>
  <dd class="col-sm-9">A description list is perfect for defining terms.</dd>

  <dt class="col-sm-3">Term</dt>
  <dd class="col-sm-9">
    <p>Definition for the term.</p>
    <p>And some more placeholder definition text.</p>
  </dd>

  <dt class="col-sm-3">Another term</dt>
  <dd class="col-sm-9">This definition is short, so no extra paragraphs or anything.</dd>

  <dt class="col-sm-3 text-truncate">Truncated term is truncated</dt>
  <dd class="col-sm-9">This can be useful when space is tight. Adds an ellipsis at the end.</dd>

  <dt class="col-sm-3">Nesting</dt>
  <dd class="col-sm-9">
    <dl class="row">
      <dt class="col-sm-4">Nested definition list</dt>
      <dd class="col-sm-8">I heard you like definition lists. Let me put a definition list inside your definition list.</dd>
    </dl>
  </dd>
</dl>

રિસ્પોન્સિવ ફોન્ટ માપો

બુટસ્ટ્રેપ 5 માં, અમે ડિફૉલ્ટ રૂપે રિસ્પોન્સિવ ફોન્ટ માપોને સક્ષમ કર્યા છે, ટેક્સ્ટને સમગ્ર ઉપકરણ અને વ્યૂપોર્ટ કદમાં વધુ કુદરતી રીતે સ્કેલ કરવાની મંજૂરી આપે છે. આ કેવી રીતે કાર્ય કરે છે તે શોધવા માટે RFS પૃષ્ઠ પર એક નજર નાખો .

સસ

ચલો

શીર્ષકોમાં કદ અને અંતર માટે કેટલાક સમર્પિત ચલો છે.

$headings-margin-bottom:      $spacer * .5;
$headings-font-family:        null;
$headings-font-style:         null;
$headings-font-weight:        500;
$headings-line-height:        1.2;
$headings-color:              null;

અહીં અને રીબૂટમાં આવરી લેવામાં આવેલા વિવિધ ટાઇપોગ્રાફી તત્વોમાં સમર્પિત ચલો પણ છે.

$lead-font-size:              $font-size-base * 1.25;
$lead-font-weight:            300;

$small-font-size:             .875em;

$sub-sup-font-size:           .75em;

$text-muted:                  $gray-600;

$initialism-font-size:        $small-font-size;

$blockquote-margin-y:         $spacer;
$blockquote-font-size:        $font-size-base * 1.25;
$blockquote-footer-color:     $gray-600;
$blockquote-footer-font-size: $small-font-size;

$hr-margin-y:                 $spacer;
$hr-color:                    inherit;
$hr-height:                   $border-width;
$hr-opacity:                  .25;

$legend-margin-bottom:        .5rem;
$legend-font-size:            1.5rem;
$legend-font-weight:          null;

$mark-padding:                .2em;

$dt-font-weight:              $font-weight-bold;

$nested-kbd-font-weight:      $font-weight-bold;

$list-inline-padding:         .5rem;

$mark-bg:                     #fcf8e3;

મિક્સિન્સ

ટાઇપોગ્રાફી માટે કોઈ સમર્પિત મિશ્રણ નથી, પરંતુ બુટસ્ટ્રેપ રિસ્પોન્સિવ ફોન્ટ સાઈઝિંગ (RFS) નો ઉપયોગ કરે છે .