说,我想为不同的设备分辨率更改文本或图片,而不是文本的大小,但完全不同的文本甚至div,是否有办法做到这一点?
答案 0 :(得分:1)
您可以使用Bootstrap' available 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;