简体   繁体   English

使用 SASS 返回 Bootstrap 列宽

[英]Return Bootstrap column width with SASS

I am trying to get a title in a column to overlap the next column without using position:absolute and preferably keeping the width of the title as wide as col-8 column to keep in proportions for smaller screens.我试图在不使用 position:absolute 的情况下让列中的标题与下一列重叠,最好保持标题的宽度与 col-8 列一样宽,以保持较小屏幕的比例。 Is there a way to achieve this using Bootstrap variables or mixins with SASS?有没有办法使用 Bootstrap 变量或混入 SASS 来实现这一点?

Here is an example of the desired outcome这是所需结果的示例

Thanks in advance!提前致谢!

This is, in general, not possible since the main idea of a grid is to contain content inside columns.这通常是不可能的,因为网格的主要思想是在列中包含内容。

Now you can achieve a similar effect (moving out the columns) when you combine CSS transform scale with lower font-size .现在,当您将 CSS transform比例与较低的font-size结合使用时,您可以实现类似的效果(移出列)。 You can take it further and add the col-8 media queries as well.您还可以进一步添加col-8媒体查询。

https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM