我有一个导航和section-top
框是88%
高(无px值)。我怎样才能使我的图像响应?当我在手机上查看网站时,图像只有一半,我希望它和页面一样高。与响应式图像%
#views_slideshow_cycle_teaser_section_home_view-block .views-field-field-home-image img{
width:100%;
height:100%;
margin-top:-50px;
}
#section-top{
position:absolute;
overflow:hidden;
height:88%;
width:100%;
}
HTML
<div id="section-top">
<div id="featured">
<?php print render($page['featured']);?>
</div>
</div>
我与height:88%
工作的原因是因为当我设置一个像素值,那么它不会涵盖在更大分辨率的页面。
图像上传与CMS系统,所以不能设置它作为背景 – Greg 2014-12-13 13:50:52
''中的百分比而不是固定值? – Mardzis 2014-12-13 13:54:16