Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用引导程序堆叠文本组件而不复制HTML_Html_Css_Twitter Bootstrap - Fatal编程技术网

使用引导程序堆叠文本组件而不复制HTML

使用引导程序堆叠文本组件而不复制HTML,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我试图让文本在大型设备上保持全宽,然后在具有较大文本的移动设备上堆叠 我意识到,如果浏览器很小,我可以为大文本显示none,然后为小设备将三个文本块设置为col-12,但这看起来像是大量的html复制。有没有更好的办法来解决这个问题 我的代码如下。我认识到我可以用引导覆盖来覆盖小型设备的字体大小。我只是需要帮助堆叠字体 我在这里包括了一项共同支出: 添加这个css,这可能会奏效 @media (max-width: @screen-xs) { h1{font-size: 30px;} } @m

我试图让文本在大型设备上保持全宽,然后在具有较大文本的移动设备上堆叠

我意识到,如果浏览器很小,我可以为大文本显示none,然后为小设备将三个文本块设置为col-12,但这看起来像是大量的html复制。有没有更好的办法来解决这个问题

我的代码如下。我认识到我可以用引导覆盖来覆盖小型设备的字体大小。我只是需要帮助堆叠字体

我在这里包括了一项共同支出:


添加这个css,这可能会奏效

@media (max-width: @screen-xs) {
h1{font-size: 30px;}
}

@media (max-width: @screen-sm) {
h1{font-size: 4px;}
}
   @media (max-width: @screen-md) {
h1{font-size: 400px;}
}
 @media (max-width: @screen-md) {
h1{font-size: 40px;}
  }
 h1{
font-size: 1.4em;
  } 

希望这有帮助

我刚问了这个问题,如果你知道答案的话,我很抱歉。但我对rails一无所知。不过我还是会尽力为你找到解决办法的。谢谢@neophyte。我认为它和变量的关系比rails处理器的关系更大,后者可能更好
@media (max-width: @screen-xs) {
h1{font-size: 30px;}
}

@media (max-width: @screen-sm) {
h1{font-size: 4px;}
}
   @media (max-width: @screen-md) {
h1{font-size: 400px;}
}
 @media (max-width: @screen-md) {
h1{font-size: 40px;}
  }
 h1{
font-size: 1.4em;
  }