Hla mus rau cov ntsiab lus tseem ceeb Hla mus rau docs navigation
in English

Browsers thiab khoom siv

Kawm txog cov browsers thiab cov khoom siv, txij li niaj hnub mus rau qub, uas tau txais kev txhawb nqa los ntawm Bootstrap, suav nrog cov paub quirks thiab kab rau txhua tus.

Txhawb browsers

Bootstrap txhawb nqa qhov tseeb, ruaj khov tso tawm ntawm txhua qhov loj browsers thiab platforms.

Lwm qhov browsers uas siv qhov tseeb version ntawm WebKit, Blink, lossis Gecko, txawm tias ncaj qha lossis los ntawm lub platform lub vev xaib saib API, tsis txaus siab. Txawm li cas los xij, Bootstrap yuav tsum (feem ntau) tso saib thiab ua haujlwm kom raug hauv cov browsers no thiab. Cov ntaub ntawv txhawb nqa tshwj xeeb muaj qhia hauv qab no.

Koj tuaj yeem pom peb qhov kev txhawb nqa ntawm browsers thiab lawv cov versions hauv peb.browserslistrc file :

# https://github.com/browserslist/browserslist#readme

>= 0.5%
last 2 major versions
not dead
Chrome >= 60
Firefox >= 60
Firefox ESR
iOS >= 12
Safari >= 12
not Explorer <= 11

Peb siv Autoprefixer los lis kev txhawb nqa browser ntawm CSS prefixes, uas siv Browserslist los tswj cov browser versions. Tham nrog lawv cov ntaub ntawv rau yuav ua li cas koom ua ke cov cuab yeej no rau hauv koj qhov project.

Cov khoom siv txawb

Feem ntau hais lus, Bootstrap txhawb nqa qhov tseeb versions ntawm txhua lub platform loj lub neej ntawd browsers. Nco ntsoov tias cov browsers npe (xws li Opera Mini, Opera Mobile's Turbo hom, UC Browser Mini, Amazon Silk) tsis txaus siab.

Chrome Firefox Safari Android Browser & WebView
Android Txhawb nqa Txhawb nqa v6.0+
iOS no Txhawb nqa Txhawb nqa Txhawb nqa

Desktop browsers

Ib yam li ntawd, qhov tseeb versions ntawm feem ntau desktop browsers tau txais kev txhawb nqa.

Chrome Firefox Microsoft Edge Opera Safari
Mac Txhawb nqa Txhawb nqa Txhawb nqa Txhawb nqa Txhawb nqa
Qhov rai Txhawb nqa Txhawb nqa Txhawb nqa Txhawb nqa

Rau Firefox, ntxiv rau qhov kev tso tawm ruaj khov tshiab kawg, peb kuj txhawb nqa qhov tseeb Extended Support Release (ESR) version ntawm Firefox.

Unofficially, Bootstrap yuav tsum saib thiab coj tus cwj pwm zoo txaus hauv Chromium thiab Chrome rau Linux, thiab Firefox rau Linux, txawm tias lawv tsis tau txais kev txhawb nqa.

Internet Explorer

Internet Explorer tsis txaus siab. Yog tias koj xav tau kev txhawb nqa Internet Explorer, thov siv Bootstrap v4.

Modals thiab dropdowns ntawm mobile

Overflow thiab scrolling

Kev them nyiaj yug rau overflow: hidden;ntawm lub <body>caij yog heev txwv nyob rau hauv iOS thiab Android. Txog qhov kawg, thaum koj scroll dhau los ntawm sab saum toj lossis hauv qab ntawm lub modal hauv ob qho ntawm cov khoom siv 'browser, cov <body>ntsiab lus yuav pib scroll. Saib Chrome kab #175502 (tso nyob rau hauv Chrome v40) thiab WebKit kab #153852 .

iOS text teb thiab scrolling

Raws li ntawm iOS 9.2, thaum lub modal qhib, yog tias qhov pib kov ntawm ib qho taw qhia scroll nyob rau hauv ciam teb ntawm cov ntawv nyeem <input>lossis a <textarea>, cov <body>ntsiab lus hauv qab lub modal yuav scrolled es tsis txhob ntawm lub modal nws tus kheej. Saib WebKit kab mob #153856 .

Lub .dropdown-backdropcaij tsis siv rau iOS no hauv nav vim qhov nyuaj ntawm z-indexing. Yog li, txhawm rau kaw cov dropdowns hauv navbars, koj yuav tsum ncaj qha nyem qhov poob qis (lossis lwm yam khoom uas yuav tua cov kev tshwm sim nyem hauv iOS ).

Browser zooming

Nplooj ntawv zooming inevitably nthuav qhia cov khoom cuav hauv qee cov khoom, ob qho tib si hauv Bootstrap thiab lwm lub vev xaib. Nyob ntawm qhov teeb meem, peb tuaj yeem kho nws (nrhiav ua ntej thiab tom qab ntawd qhib qhov teeb meem yog tias xav tau). Txawm li cas los xij, peb nyiam tsis quav ntsej cov no vim lawv feem ntau tsis muaj kev daws teeb meem uas tsis yog hacky workarounds.

Cov validators

Txhawm rau muab qhov ua tau zoo tshaj plaws rau cov laus thiab cov neeg tsis paub browsers, Bootstrap siv CSS browser hacks hauv ntau qhov chaw txhawm rau tsom CSS tshwj xeeb rau qee qhov browser versions txhawm rau ua haujlwm nyob ib puag ncig cov kab hauv browsers lawv tus kheej. Cov hacks no nkag siab ua rau CSS validators yws tias lawv tsis raug. Nyob rau hauv ob peb qhov chaw, peb kuj siv los ntshav-ntug CSS nta uas tseem tsis tau tag nrho cov qauv, tab sis cov no yog siv dawb huv rau kev nce qib.

Cov lus ceeb toom kev lees paub no tsis muaj teeb meem hauv kev xyaum txij li qhov tsis yog hacky ntawm peb CSS tau siv tau tag nrho thiab cov feem hacky tsis cuam tshuam nrog kev ua haujlwm zoo ntawm qhov tsis yog hacky, yog li vim li cas peb txhob txwm tsis quav ntsej cov lus ceeb toom tshwj xeeb no.

Peb cov ntaub ntawv HTML kuj tseem muaj qee qhov tsis tseem ceeb thiab tsis tsim nyog HTML validation ceeb toom vim peb suav nrog kev ua haujlwm rau qee yam kab mob Firefox .