Bootstrap 中 Fluid Row 的偏移 Margin-Left 百分比 [英] Offset Margin-Left Percentages for Fluid Row in Bootstrap

查看:21
本文介绍了Bootstrap 中 Fluid Row 的偏移 Margin-Left 百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到并包括 Twitter Bootstrap v2.0.4,在行流场景中使用偏移类时,没有 CSS 边距左百分比.我在 SO 和其他网站上寻找答案,但找不到.

Up to and including Twitter Bootstrap v2.0.4, there have been no CSS margin-left percentages when using the offset class in a row-fluid scenario. I have looked on SO and other sites for an answer but cannot find one.

有人有这些信息可以添加到我的 bootstrap-responsive.css 文件中吗?

Does anyone have this information that I can add to my bootstrap-responsive.css file?

谢谢,

克里斯

推荐答案

我在 Excel 上花了一晚,想出了以下 CSS:

I spent one night with Excel and came up with the following CSS:

/* ---------- Start of bootstrap-responsive.css offset left-margin ---------- */
.row-fluid .offset12 {
margin-left: 105.524861871% !important;
*margin-left: 104.195074636958% !important;
}

.row-fluid .offset11 {
margin-left: 96.96132596% !important;
*margin-left: 95.7379217046809% !important;
}

.row-fluid .offset10 {
margin-left: 88.397790049% !important;
*margin-left: 87.2807687724043% !important;
}

.row-fluid .offset9 {
margin-left: 79.834254138% !important;
*margin-left: 78.8236158401277% !important;
}

.row-fluid .offset8 {
margin-left: 71.270718227% !important;
*margin-left: 70.3664629078511% !important;
}

.row-fluid .offset7 {
margin-left: 62.707182316% !important;
*margin-left: 61.9093099755745% !important;
}

.row-fluid .offset6 {
margin-left: 54.143646405% !important;
*margin-left: 53.4521570432979% !important;
}

.row-fluid .offset5 {
margin-left: 45.580110494% !important;
*margin-left: 44.9950041110213% !important;
}

.row-fluid .offset4 {
margin-left: 37.016574583% !important;
*margin-left: 36.5378511787447% !important;
}

.row-fluid .offset3 {
margin-left: 28.453038672% !important;
*margin-left: 28.0806982464681% !important;
}

.row-fluid .offset2 {
margin-left: 19.889502761% !important;
*margin-left: 19.6235453141915% !important;
}

.row-fluid .offset1 {
margin-left: 11.32596685% !important;
*margin-left: 11.1663923819149% !important;
}

/* ---------- End of bootstrap-responsive.css offset left-margin ---------- */

我将它插入到 bootstrap-responsive.css 中,从第 370 行开始(在 .row-fluid .span1 的样式块关闭之后

I inserted this into bootstrap-responsive.css, starting at line 370 (after the close of the style block for .row-fluid .span1

它解决了我的网站问题.它仅在FF13中进行了测试.它可能会导致其他浏览器出现问题.

It solved my website issues. It was only tested in FF13. It may cause issues in other browsers.

我对 SO 还很陌生,所以如果这不是推荐的发布此类信息的方法,我深表歉意.一切都在进行中.

I am pretty new to SO so I apologize if this was not the recommended method of posting info like this. Its all a work-in-progress.

这篇关于Bootstrap 中 Fluid Row 的偏移 Margin-Left 百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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