مرجع سريع

ورقة غش بوتستراب (Bootstrap)

دليل كامل لاستخدام إطار عمل بوتستراب (Bootstrap)، يغطي الميزات الأساسية مثل نظام الشبكة، مكتبة المكونات، والتخطيط المتجاوب لمساعدة المطورين على بناء مواقع متجاوبة حديثة بسرعة.

· تاريخ النشر

أحجام الشاشة

         768          992                1200
'     '     '     '     '     '     '     '
<---------^------------^------------------^--------->
     xs         sm              md             lg
   (هاتف)     (تابلت)         (لابتوب)        (ديسك توب)

الأدنى (Min):

@media (min-width: @screen-sm-min) // >= 768px (شاشة صغيرة، تابلت)
@media (min-width: @screen-md-min) // >= 992px (شاشة متوسطة، ديسك توب)
@media (min-width: @screen-lg-min) // >= 1200px (شاشة كبيرة، ديسك توب كبير)

الأقصى (Max):

@media (max-width: @screen-xs-max) { // < 768px (شاشة صغيرة جداً، هاتف)
@media (max-width: @screen-sm-max) { // < 992px (شاشة صغيرة، تابلت)
@media (max-width: @screen-md-max) { // < 1200px (شاشة متوسطة، ديسك توب)

الشبكة (Grid)

.container
.container-fluid
.col-xs-1
.col-sm-1
.col-md-1
.col-lg-1
.col-md-offset-1

الماكرو (Mixins):

@include make-xs-column(12);
@include make-sm-column(6);
@include make-md-column(3);
@include make-lg-column(3);
@include make-sm-column-offset(1);
@include make-sm-column-push(1);
@include make-sm-column-pull(1);

الأدوات المتجاوبة

.pull-left
.pull-right
.hidden-{xs,sm,md,lg}
.visible-{xs,sm,md,lg}
.visible-{xs,sm,md,lg,print}-{block,inline,inline-block}
.center-block  /* margin: auto */
.clearfix
.text-{center,left,right,justify,nowrap}
.text-{lowercase,uppercase,capitalize}
.show
.hidden

النافذة المنبثقة (Modal)

<a data-toggle='modal' data-target='#new'>
#new.modal.fade(role='dialog')
  .modal-dialog // .modal-lg, .modal-sm
    .modal-content
      .modal-header
        %h4.modal-title hello
        %button.close{type: 'button', data: { dismiss: 'modal' }}
          %span{'aria-hidden' => true}!= "&times;"
          %span.sr-only Close
      .modal-body
        ...
      .modal-footer
        ...

أجاكس (Ajax) مع النافذة المنبثقة

%button.btn{data: { |
  toggle: 'modal', |
  target: '#chooseTheme', |
  remote: '/path/to/remote'}
  Change Theme
.modal.fade#chooseTheme
  .modal-dialog.modal-xl
    .modal-content
      .modal-header
        %h4.modal-title Choose a theme

      .modal-body
        .spinner-panel.-lg
          %i

تلميحات الأدوات (Tooltip)

<span
  data-toggle='tooltip'
  title='tooltip'
  data-placement='left|top|bottom|right'>
$(function () {
  $('[data-toogle~="tooltip"]').tooltip()
})

مجموعة حقول الإدخال

.input-group
    input.form-control(type='text')
    .input-group-addon years

موضوعات ذات صلة