如何在不同的分辨率(有或没有引导程序)上更改内容(替换文本,图像等)?

时间:2016-10-02 14:02:13

标签: html5 twitter-bootstrap-3 responsive

说,我想为不同的设备分辨率更改文本或图片,而不是文本的大小,但完全不同的文本甚至div,是否有办法做到这一点?

1 个答案:

答案 0 :(得分:1)

您可以使用Bootstrap' available classes

table of classes

例如:



<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

<div class="container">
  <h1 class="text-center">This device is <span class="visible-xs-inline">extra small</span><span class="visible-sm-inline">small</span><span class="visible-md-inline">medium</span><span class="visible-lg-inline">large</span></h1>
  <img class="visible-xs-block center-block" src="http://i.stack.imgur.com/pIuT0.png" alt="phone">
  <img class="visible-sm-block center-block" src="http://i.stack.imgur.com/MA6ZP.png" alt="tablet">
  <img class="visible-md-block center-block" src="http://i.stack.imgur.com/6IekS.png" alt="notebook">
  <img class="visible-lg-block center-block" src="http://i.stack.imgur.com/3oaMK.png" alt="desktop">
</div>
&#13;
&#13;
&#13;