Html 如何调整文本大小';s宽度与图像响应宽度相对应

Html 如何调整文本大小';s宽度与图像响应宽度相对应,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,自从一周前我开始学习html5/css3和bootstrap以来,我对html5/css3和bootstrap是个新手 我的问题是,我希望文本宽度(显示文本的区域宽度)与响应图像的宽度相应。 当页面处于lg/md/sm响应模式时,文本会根据“其宽度”正确显示在图像下方,但在xs响应模式下,文本不会正确显示 我想要的图像: 您建议的解决方案的图像(链接到图像,用键盘键切换!)(问题仍然存在!): 以下是HTML代码: <div class="container"> <di

自从一周前我开始学习html5/css3和bootstrap以来,我对html5/css3和bootstrap是个新手

我的问题是,我希望文本宽度(显示文本的区域宽度)与响应图像的宽度相应。 当页面处于lg/md/sm响应模式时,文本会根据“其宽度”正确显示在图像下方,但在xs响应模式下,文本不会正确显示

我想要的图像:

您建议的解决方案的图像(链接到图像,用键盘键切换!)(问题仍然存在!):

以下是HTML代码:

<div class="container">
  <div class="page-header" id="p-h-1">
    <h1>Latest News</h1>
  </div>
  <div class="row">
    <div class="col xm-12 col-sm-4">
      <figure>
        <img src="images/prova.jpg" class="img-responsive center-block" /></figure>
        <h3 class="text-center">Prova</h3>
        <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col xm-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col xm-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
  </div>
</div>

我想我看到了网格管理中的一个错误,它是用
col xm-12
编写的,它不是一个类bootstrap3,而不是“用xs作为`

普罗瓦康卡斯特酒店

<div class="container">
  <div class="page-header" id="p-h-1">
    <h1>Latest News</h1>
  </div>
  <div class="row">
    <div class="col-xs-12 col-sm-4">
      <figure>
        <img src="images/prova.jpg" class="img-responsive center-block" /></figure>
        <h3 class="text-center">Prova</h3>
        <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
  </div>
</div>

最新消息
普罗瓦
布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点


我想我看到了网格管理中的一个错误,它是用
列xm-12编写的,它不是一个类bootstrap3,而不是“用xs作为`

普罗瓦康卡斯特酒店

<div class="container">
  <div class="page-header" id="p-h-1">
    <h1>Latest News</h1>
  </div>
  <div class="row">
    <div class="col-xs-12 col-sm-4">
      <figure>
        <img src="images/prova.jpg" class="img-responsive center-block" /></figure>
        <h3 class="text-center">Prova</h3>
        <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
  </div>
</div>

最新消息
普罗瓦
布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部面积约为25×25米(82×82英尺),几乎平坦,是挪威著名的旅游景点


您可以将网格更改为
col-xs-6
并使用
col-xs-offset-3

输出:

@介质(最大宽度:767px){
p{
文本对齐:居中;
}
}

最新消息
普罗瓦
布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖
挪威的旅游胜地

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖 挪威的旅游胜地

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖 挪威的旅游胜地


您可以将网格更改为
col-xs-6
并使用
col-xs-offset-3

输出:

@介质(最大宽度:767px){
p{
文本对齐:居中;
}
}

最新消息
普罗瓦
布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖
挪威的旅游胜地

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖 挪威的旅游胜地

普罗瓦 布道坛岩石是一块巨大的悬崖,位于挪威Ryfylke Forsand的Kjerag高原对面的Lysefjorden上方604米(1982英尺)。悬崖顶部约为25×25米(82×82英尺)见方,几乎平坦,是著名的悬崖 挪威的旅游胜地


但在xs响应模式下,文本显示不正确。不确定没有显示的内容。我可以从这里正确地看到它。我附加了一个图像来更好地解释我想要什么,但在xs响应模式下,文本显示不正确。不确定没有显示的内容。我看得很清楚
<div class="container">
  <div class="page-header" id="p-h-1">
    <h1>Latest News</h1>
  </div>
  <div class="row">
    <div class="col-xs-12 col-sm-4">
      <figure>
        <img src="images/prova.jpg" class="img-responsive center-block" /></figure>
        <h3 class="text-center">Prova</h3>
        <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
    <div class="col-xs-12 col-sm-4">
      <figure><img src="images/prova.jpg" class="img-responsive center-block" /></figure>
      <h3 class="text-center">Prova</h3>
      <p>The Pulpit Rock is a massive cliff 604 metres (1982 feet) above Lysefjorden, opposite the Kjerag plateau, in Forsand, Ryfylke, Norway. The top of the cliff is approximately 25 by 25 metres (82 by 82 feet) square and almost flat, and is a famous tourist attraction in Norway.</p>
    </div>
  </div>
</div>