Source

مرورگرها و دستگاه ها

درباره مرورگرها و دستگاه‌ها، از مدرن تا قدیمی، که توسط Bootstrap پشتیبانی می‌شوند، از جمله ویژگی‌های عجیب و غریب و اشکالات شناخته شده برای هر کدام، بیاموزید.

مرورگرهای پشتیبانی شده

بوت استرپ از جدیدترین و پایدارترین نسخه های تمام مرورگرها و پلتفرم های اصلی پشتیبانی می کند. در ویندوز، ما از Internet Explorer 10-11 / Microsoft Edge پشتیبانی می کنیم .

مرورگرهای جایگزینی که از آخرین نسخه WebKit، Blink، یا Gecko استفاده می‌کنند، خواه مستقیماً یا از طریق API نمای وب پلت‌فرم، صریحاً پشتیبانی نمی‌شوند. با این حال، بوت استرپ باید (در بیشتر موارد) در این مرورگرها نیز به درستی نمایش داده و کار کند. اطلاعات بیشتر پشتیبانی در زیر ارائه شده است.

می توانید طیف وسیعی از مرورگرهای پشتیبانی شده و نسخه های آنها را در ما.browserslistrc file بیابید :

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

>= 1%
last 1 major version
not dead
Chrome >= 45
Firefox >= 38
Edge >= 12
Explorer >= 10
iOS >= 9
Safari >= 9
Android >= 4.4
Opera >= 30

ما از Autoprefixer برای مدیریت پشتیبانی مرورگر مورد نظر از طریق پیشوندهای CSS استفاده می کنیم که از فهرست مرورگرها برای مدیریت این نسخه های مرورگر استفاده می کند. برای نحوه ادغام این ابزارها در پروژه های خود با اسناد آنها مشورت کنید.

دستگاه های موبایل

به طور کلی، بوت استرپ از آخرین نسخه های مرورگرهای پیش فرض هر پلت فرم اصلی پشتیبانی می کند. توجه داشته باشید که مرورگرهای پروکسی (مانند Opera Mini، حالت Turbo Opera Mobile، UC Browser Mini، Amazon Silk) پشتیبانی نمی شوند.

کروم فایرفاکس سافاری مرورگر اندروید و نمای وب مایکروسافت اج
اندروید پشتیبانی پشتیبانی N/A اندروید نسخه 5.0+ پشتیبانی می شود پشتیبانی
iOS پشتیبانی پشتیبانی پشتیبانی N/A پشتیبانی
ویندوز 10 موبایل N/A N/A N/A N/A پشتیبانی

مرورگرهای دسکتاپ

به طور مشابه، آخرین نسخه های اکثر مرورگرهای دسکتاپ پشتیبانی می شوند.

کروم فایرفاکس اینترنت اکسپلورر مایکروسافت اج اپرا سافاری
مک پشتیبانی پشتیبانی N/A N/A پشتیبانی پشتیبانی
پنجره ها پشتیبانی پشتیبانی پشتیبانی شده، IE10+ پشتیبانی پشتیبانی پشتیبانی نشده

برای فایرفاکس، علاوه بر آخرین نسخه معمولی پایدار، ما از آخرین نسخه پشتیبانی گسترده (ESR) فایرفاکس نیز پشتیبانی می کنیم.

به طور غیررسمی، Bootstrap باید در Chromium و Chrome برای لینوکس، Firefox برای Linux و Internet Explorer 9 به اندازه کافی خوب ظاهر و رفتار کند، اگرچه آنها به طور رسمی پشتیبانی نمی شوند.

برای لیستی از برخی از اشکالات مرورگر که Bootstrap باید با آنها دست و پنجه نرم کند، به دیوار اشکالات مرورگر ما مراجعه کنید .

اینترنت اکسپلورر

Internet Explorer 10+ پشتیبانی می شود. IE9 و پایین نیست. لطفاً توجه داشته باشید که برخی از ویژگی های CSS3 و عناصر HTML5 به طور کامل در IE10 پشتیبانی نمی شوند یا برای عملکرد کامل به ویژگی های پیشوند نیاز دارند. برای جزئیات در مورد پشتیبانی مرورگر از ویژگی‌های CSS3 و HTML5، از Can I use… دیدن کنید. اگر به پشتیبانی IE8-9 نیاز دارید، از Bootstrap 3 استفاده کنید.

مدال ها و کشویی ها در موبایل

سرریز و پیمایش

پشتیبانی overflow: hidden;از <body>عنصر در iOS و Android کاملاً محدود است. برای این منظور، وقتی در مرورگرهای آن دستگاه‌ها از بالا یا پایین یک مدال عبور می‌کنید، <body>محتوا شروع به پیمایش می‌کند. به اشکال کروم #175502 (در کروم نسخه 40 رفع شد) و باگ #153852 WebKit مراجعه کنید.

فیلدهای متنی iOS و پیمایش

As of iOS 9.2, while a modal is open, if the initial touch of a scroll gesture is within the boundary of a textual <input> or a <textarea>, the <body> content underneath the modal will be scrolled instead of the modal itself. See WebKit bug #153856.

The .dropdown-backdrop element isn’t used on iOS in the nav because of the complexity of z-indexing. Thus, to close dropdowns in navbars, you must directly click the dropdown element (or any other element which will fire a click event in iOS).

Browser zooming

Page zooming inevitably presents rendering artifacts in some components, both in Bootstrap and the rest of the web. Depending on the issue, we may be able to fix it (search first and then open an issue if need be). However, we tend to ignore these as they often have no direct solution other than hacky workarounds.

Sticky :hover/:focus on iOS

While :hover isn’t possible on most touch devices, iOS emulates this behavior, resulting in “sticky” hover styles that persist after tapping one element. These hover styles are only removed when users tap another element. This behavior is considered largely undesirable and appears to not be an issue on Android or Windows devices.

Throughout our v4 alpha and beta releases, we included incomplete and commented out code for opting into a media query shim that would disable hover styles in touch device browsers that emulate hovering. This work was never fully completed or enabled, but to avoid complete breakage, we’ve opted to deprecate this shim and keep the mixins as shortcuts for the pseudo-classes.

Printing

Even in some modern browsers, printing can be quirky.

As of Safari v8.0, use of the fixed-width .container class can cause Safari to use an unusually small font size when printing. See issue #14868 and WebKit bug #138192 for more details. One potential workaround is the following CSS:

@media print {
  .container {
    width: auto;
  }
}

Android stock browser

Out of the box, Android 4.1 (and even some newer releases apparently) ship with the Browser app as the default web browser of choice (as opposed to Chrome). Unfortunately, the Browser app has lots of bugs and inconsistencies with CSS in general.

Select menu

On <select> elements, the Android stock browser will not display the side controls if there is a border-radius and/or border applied. (See this StackOverflow question for details.) Use the snippet of code below to remove the offending CSS and render the <select> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.

<script>
$(function () {
  var nua = navigator.userAgent
  var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
  if (isAndroid) {
    $('select.form-control').removeClass('form-control').css('width', '100%')
  }
})
</script>

Want to see an example? Check out this JS Bin demo.

Validators

In order to provide the best possible experience to old and buggy browsers, Bootstrap uses CSS browser hacks in several places to target special CSS to certain browser versions in order to work around bugs in the browsers themselves. These hacks understandably cause CSS validators to complain that they are invalid. In a couple places, we also use bleeding-edge CSS features that aren’t yet fully standardized, but these are used purely for progressive enhancement.

These validation warnings don’t matter in practice since the non-hacky portion of our CSS does fully validate and the hacky portions don’t interfere with the proper functioning of the non-hacky portion, hence why we deliberately ignore these particular warnings.

اسناد HTML ما نیز به دلیل گنجاندن راه حلی برای یک اشکال خاص فایرفاکس، هشدارهای اعتبارسنجی HTML بی اهمیت و بی اهمیتی دارند .