html - 如何获得图像的响应式设计?

标签 html css twitter-bootstrap

我使用 Bootstrap 类来设计我的网页。但是在我最小化窗口时图像大小和文本大小被拖拽了。怎么办?

<div class="col-sm-3  col-md-3">
<div class="panel panel-success" style="height:200px;">
<div class="panel-heading"><b>TIMESHEET</b></div>
        <div class="panel-body">
    <a href="@routes.Timesheets.showSelectPage()"><img src="@routes.Assets.at("images/tabImages/timesheet.png")" class="img-responsive center-block" alt="Image" style="width:17%;"><p class="text-muted">Timesheet Processing</p>
    </a>
     </div>
 </div> 

CSS:

.panel-success{
height:220px;
}
.panel-heading{
text-align:center;
font-size:22px;
padding:5px 0px 5px 0px;
}
.center-block{
 width:45%;
}
.panel-warning{
 height:200px;
}

最佳答案

如果使用 Bootstrap ,您可以在这里找到帮助 Response Images in Bootstrap

如果文本变得失真,我建议您检查您的 Bootstrap 类。

关于html - 如何获得图像的响应式设计?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38179418/

相关文章:

javascript - 滚动 <div> 旁边的静态 <div>

css - 网格系统中的 Bootstrap 白中断

javascript - HTML5 拖放

html - font-size : 100% on the html element do? 是什么意思

html - css - 悬停过渡 :after

html - div 和 div 中的图像分开执行

jQuery onResize 图像定位问题

css - Bootstrap Mobile 向下滚动,浏览器 url 栏没有隐藏

javascript - 我收到涉及这些行中某些内容的语法错误

html - 批处理 - 找到匹配字符串时拆分 html 文件