使用 Jquery 调整 DIV 内图像的大小
我在这种情况下需要帮助...我正在尝试开发一个横幅旋转器(全宽),但我没有找到任何解决方案来拉伸/调整幻灯片图像(在 div 中)100% 宽度并保持宽高比比率。我想用 jQuery 来做到这一点...有谁知道一个 JQuery 插件可以解决这种情况!
我想要类似 this 的东西,但应用于一个类,因为我不想要这个到所有图像!
请检查下面我的代码示例。非常感谢! :)
<!-- START BANNER WRAPPER -->
<div id="banner-wrapper">
<div id="banner-full-width">
<div id="main-slider">
<div class="slide">
<div class="image">
<img src="" /> <!-- This is the image i want to fit inside of 100% width div -->
</div>
<div class="info">...</div>
</div>
</div>
</div>
</div>
<!-- END BANNER WRAPPER -->
I need help with this situation... i´m trying to develop a banner rotator (full width), but i didn´t find any solution to strech/resize a slide image (indide a div) 100% width and maintain the aspect ratio. I want to do it with jQuery... does anyone knows a JQuery plugin that solves this situation!!
I Want something sililar of this , but applied to a class, because i don´t want this to all images!!!
Please check below an example of my code. Many thanks in advance!! :)
<!-- START BANNER WRAPPER -->
<div id="banner-wrapper">
<div id="banner-full-width">
<div id="main-slider">
<div class="slide">
<div class="image">
<img src="" /> <!-- This is the image i want to fit inside of 100% width div -->
</div>
<div class="info">...</div>
</div>
</div>
</div>
</div>
<!-- END BANNER WRAPPER -->
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的 CSS 怎么样?
How about good ol' CSS?