Mac 网格问题上的 Bootstrap 4 Safari [英] Bootstrap 4 Safari on Mac Grid issue

查看:16
本文介绍了Mac 网格问题上的 Bootstrap 4 Safari的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Mac 上的 Bootstrap 4 和 Safari 浏览器存在问题.当在一行中使用 cols 时,它会破坏它,并且不像在 Firefox 或 chrome 上那样工作.我正在使用这样的简单代码:

<div class="col-sm-12 col-md-3 hidden-xs align_left"><h3>TEXT</h3></div><div class="col-sm-4 col-md-3">TEXT</div><div class="col-sm-4 col-md-3">TEXT</div><div class="col-sm-4 col-md-3">TEXT</div>

我正在尝试与其他问题不同的修复代码",但它们并没有解决问题.有什么线索吗?

提前致谢

解决方案

终于用这个简单的 CSS 解决了这个问题:

.row:before, .row:after {display: none !important;}

似乎在行内的 :before 和 :after 元素中隐藏了一些代码.这会导致 safari 浏览器出现某种问题.

希望有帮助.

There is an issue with Bootstrap 4 and Safari brower on Mac. When using cols inside a row it breaks it, and doesn't work like on firefox or chrome. I'm using a simple code like this:

<div class="row align-items-center">
    <div class="col-sm-12 col-md-3 hidden-xs align_left"><h3>TEXT</h3></div>
    <div class="col-sm-4 col-md-3">TEXT</div>
    <div class="col-sm-4 col-md-3">TEXT</div>
    <div class="col-sm-4 col-md-3">TEXT</div>
</div>

I'm trying different 'fix codes' from another questions but they doesn't solve the problem. Any clue?

Thanks in advance

解决方案

Finally solved the problem with this simple CSS:

.row:before, .row:after {display: none !important;}

It seems there is some code hidden in :before and :after elements inside the rows. This causes some kind of issues in safari browsers.

Hope it helps.

这篇关于Mac 网格问题上的 Bootstrap 4 Safari的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆