直到并包括Twitter Bootstrap v2.0.4,在行 - 流体场景中使用偏移类时,没有CSS边距左百分比。我已经在SO和其他网站上找到答案,但找不到答案。
是否有人可以将此信息添加到我的bootstrap-responsive.css文件中?
谢谢,
克里斯
答案 0 :(得分:5)
您可能还需要原始偏移量。最好将偏移量的另一个代码添加到左侧。
我添加了一个名为offsetright的新类,并将此代码添加到bootstrap.css:
.row-fluid .offsetright12 {
margin-right: 104.25531914893617%;
*margin-right: 104.14893617021275%;
}
.row-fluid .offsetright12:last-child {
margin-right: 102.12765957446808%;
*margin-right: 102.02127659574467%;
}
.row-fluid .offsetright11 {
margin-right: 95.74468085106382%;
*margin-right: 95.6382978723404%;
}
.row-fluid .offsetright11:last-child {
margin-right: 93.61702127659574%;
*margin-right: 93.51063829787232%;
}
.row-fluid .offsetright10 {
margin-right: 87.23404255319149%;
*margin-right: 87.12765957446807%;
}
.row-fluid .offsetright10:last-child {
margin-right: 85.1063829787234%;
*margin-right: 84.99999999999999%;
}
.row-fluid .offsetright9 {
margin-right: 78.72340425531914%;
*margin-right: 78.61702127659572%;
}
.row-fluid .offsetright9:last-child {
margin-right: 76.59574468085106%;
*margin-right: 76.48936170212764%;
}
.row-fluid .offsetright8 {
margin-right: 70.2127659574468%;
*margin-right: 70.10638297872339%;
}
.row-fluid .offsetright8:last-child {
margin-right: 68.08510638297872%;
*margin-right: 67.9787234042553%;
}
.row-fluid .offsetright7 {
margin-right: 61.70212765957446%;
*margin-right: 61.59574468085106%;
}
.row-fluid .offset7right:last-child {
margin-right: 59.574468085106375%;
*margin-right: 59.46808510638297%;
}
.row-fluid .offsetright6 {
margin-right: 53.191489361702125%;
*margin-right: 53.085106382978715%;
}
.row-fluid .offsetright6:last-child {
margin-right: 51.063829787234035%;
*margin-right: 50.95744680851063%;
}
.row-fluid .offsetright5 {
margin-right: 44.68085106382979%;
*margin-right: 44.57446808510638%;
}
.row-fluid .offsetright5:last-child {
margin-right: 42.5531914893617%;
*margin-right: 42.4468085106383%;
}
.row-fluid .offsetright4 {
margin-right: 36.170212765957444%;
*margin-right: 36.06382978723405%;
}
.row-fluid .offsetright4:last-child {
margin-right: 34.04255319148936%;
*margin-right: 33.93617021276596%;
}
.row-fluid .offsetright3 {
margin-right: 27.659574468085104%;
*margin-right: 27.5531914893617%;
}
.row-fluid .offsetright3:last-child {
margin-right: 25.53191489361702%;
*margin-right: 25.425531914893618%;
}
.row-fluid .offsetright2 {
margin-right: 19.148936170212764%;
*margin-right: 19.04255319148936%;
}
.row-fluid .offsetright2:last-child {
margin-right: 17.02127659574468%;
*margin-right: 16.914893617021278%;
}
.row-fluid .offsetright1 {
margin-right: 10.638297872340425%;
*margin-right: 10.53191489361702%;
}
.row-fluid .offsetright1:last-child {
margin-right: 8.51063829787234%;
*margin-right: 8.404255319148938%;
}
对bootstrap-responsive.css执行相同操作:
.row-fluid .offsetright12 {
margin-right: 105.12820512820512%;
*margin-lerightft: 105.02182214948171%;
}
.row-fluid .offsetright12:last-child {
margin-right: 102.56410256410257%;
*margin-right: 102.45771958537915%;
}
.row-fluid .offsetright11 {
margin-right: 96.58119658119658%;
*margin-right: 96.47481360247316%;
}
.row-fluid .offsetright11:last-child {
margin-right: 94.01709401709402%;
*margin-right: 93.91071103837061%;
}
.row-fluid .offsetright10 {
margin-right: 88.03418803418803%;
*margin-right: 87.92780505546462%;
}
.row-fluid .offsetright10:last-child {
margin-right: 85.47008547008548%;
*margin-right: 85.36370249136206%;
}
.row-fluid .offsetright9 {
margin-right: 79.48717948717949%;
*margin-right: 79.38079650845607%;
}
.row-fluid .offsetright9:last-child {
margin-right: 76.92307692307693%;
*margin-right: 76.81669394435352%;
}
.row-fluid .offsetright8 {
margin-right: 70.94017094017094%;
*margin-right: 70.83378796144753%;
}
.row-fluid .offsetright8:last-child {
margin-right: 68.37606837606839%;
*margin-right: 68.26968539734497%;
}
.row-fluid .offsetright7 {
margin-right: 62.393162393162385%;
*margin-right: 62.28677941443899%;
}
.row-fluid .offsetright7:last-child {
margin-right: 59.82905982905982%;
*margin-right: 59.72267685033642%;
}
.row-fluid .offsetright6 {
margin-right: 53.84615384615384%;
*margin-right: 53.739770867430444%;
}
.row-fluid .offsetright6:last-child {
margin-right: 51.28205128205128%;
*margin-right: 51.175668303327875%;
}
.row-fluid .offsetright5 {
margin-right: 45.299145299145295%;
*margin-right: 45.1927623204219%;
}
.row-fluid .offsetright5:last-child {
margin-right: 42.73504273504273%;
*margin-right: 42.62865975631933%;
}
.row-fluid .offsetright4 {
margin-right: 36.75213675213675%;
*margin-right: 36.645753773413354%;
}
.row-fluid .offsetright4:last-child {
margin-right: 34.18803418803419%;
*margin-right: 34.081651209310785%;
}
.row-fluid .offsetright3 {
margin-right: 28.205128205128204%;
*margin-right: 28.0987452264048%;
}
.row-fluid .offsetright3:last-child {
margin-right: 25.641025641025642%;
*margin-right: 25.53464266230224%;
}
.row-fluid .offsetright2 {
margin-right: 19.65811965811966%;
*margin-right: 19.551736679396257%;
}
.row-fluid .offsetright2:last-child {
margin-right: 17.094017094017094%;
*margin-right: 16.98763411529369%;
}
.row-fluid .offsetright1 {
margin-right: 11.11111111111111%;
*margin-right: 11.004728132387708%;
}
.row-fluid .offsetright1:last-child {
margin-right: 8.547008547008547%;
*margin-right: 8.440625568285142%;
}
答案 1 :(得分:0)
我在Excel上度过了一晚,并提出了以下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的样式块关闭之后
它解决了我的网站问题。它仅在FF13中测试过。它可能会导致其他浏览器出现问题。
我是新手,所以我很抱歉,如果这不是发布这样的信息的推荐方法。这一切都在进行中。