Jquery 图像溢出div区域

Jquery 图像溢出div区域,jquery,html,css,Jquery,Html,Css,我想在prew_框区域内看到完整的图像。图像溢出prew_框区域。如何调整所有图像的大小以适合prew_框并将其显示为滑块。 我通常用这种方式 img {width: 100%;max-height:250px} 或 如果您想通过编程(php)解决问题,请尝试剪切或调整图像大小 将图像宽度设置为100%。或者身高。并摆脱绝对定位。最大宽度:100%;宽度:自动;高度:自动;对于图片,也按照MelanciaUK的建议进行定位。@MelanciaUK我按照您的建议进行了定位。我的图片现在可以放在

我想在prew_框区域内看到完整的图像。图像溢出prew_框区域。如何调整所有图像的大小以适合prew_框并将其显示为滑块。


我通常用这种方式

img {width: 100%;max-height:250px}


如果您想通过编程(php)解决问题,请尝试剪切或调整图像大小


将图像宽度设置为100%。或者身高。并摆脱绝对定位。最大宽度:100%;宽度:自动;高度:自动;对于图片,也按照MelanciaUK的建议进行定位。@MelanciaUK我按照您的建议进行了定位。我的图片现在可以放在prew_框中,但图片的一部分只被看到,其余部分被剪掉了。您是否尝试了@Yunus建议?您是否删除了图像的
位置:绝对
?您是否面临与此问题类似的问题?。如果图像仍然处于绝对位置,所有这些都无法解决问题。如果要通过编程解决(php),请尝试剪切图像。在我的项目中,我对所有的图片都使用这个选项,不仅你的答案不能解决OP问题,而且现在你推荐的东西完全超出了范围。
#slider {

overflow:hidden;
position:relative;
 width:750px; 
height:250px;
background:url(images/loading.gif) no-repeat 50% 50%;
}
#slider img {
position:absolute;
top:0px;
left:0px;

  min-width:100%;


 }
 #slider a {
border:0;
display:block;
}

 .nivo-controlNav {
position:absolute;
left:260px;
bottom:-42px;
display: none;
}
.nivo-controlNav a {
display:block;
width:22px;
height:22px;
background:url(images/bullets.png) no-repeat;
text-indent:-9999px;
border:0;
margin-right:3px;
float:left;
}
 .nivo-controlNav a.active {
background-position:0 -22px;
}

.nivo-directionNav a {
display:block;
width:30px;
height:30px;
background:url(images/arrows.png) no-repeat;
text-indent:-9999px;
border:0;
}
a.nivo-nextNav {
background-position:-30px 0;
right:15px;
}
a.nivo-prevNav {
left:15px;
}

.nivo-caption {
text-shadow:none;
font-family: Helvetica, Arial, sans-serif;
}
.nivo-caption a { 
color:#efe9d1;
text-decoration:underline;
}
img {width: 100%;max-height:250px}
img {max-width:100%;height:250px;margin:0 auto}