简体   繁体   English

拉伸图像

[英]Stretching an image

All right so i have got an image inside a slider and it does not scale properly. 好吧,所以我在滑块内有一个图像,它不能正确缩放。

It is first small and then stretches.I want it to be stretched all the way through.How can this be achieved? 它先是小然后延伸,我希望一直延伸到这一点,如何实现呢?

Have a look at the screenshots(ignore the red in second screenshot): 看一下屏幕截图(忽略第二个屏幕截图中的红色):

在此处输入图片说明在此处输入图片说明

And the css: 和CSS:

.slider-wrapper { 
    width: 310px; 
    height: 580px;
      background: url("images/S4.png") center center ;
background-size: contain;
   background-repeat: no-repeat;        
}
.nivoSlider {
    position:relative;
    width:268px;
    height:474px;
    top:51px;
    bottom:0px;
    left:21px;
    right:23px;
    overflow: hidden;
}
.nivoSlider img {
    position:absolute;
    top:0px;
    left:0px;
    width:268px;
    height:474px;
}

And a link to the page: 以及指向页面的链接:

http://oneapptheme.github.io http://oneapptheme.github.io

您可以尝试:-

.nivoSlider3 img{height:100% !important;}

在图片的css文件中使用... background-size:100%;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM