Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用JQuery缩放图像_Jquery_Html_Twitter Bootstrap - Fatal编程技术网

使用JQuery缩放图像

使用JQuery缩放图像,jquery,html,twitter-bootstrap,Jquery,Html,Twitter Bootstrap,我有一些代码,我试图调整悬停图像的大小,我想我需要添加一个类到它,但我一直在努力使它看起来平滑和实际工作。那么,我能把p-6改成p-5来达到我想要的效果吗 这是与图像相关的HTML标记: <div class="col-lg-6 order-lg-2"> <div class="p-5"> <img class="img-fluid rounded-circle" src="img/joe.jpg" alt="Joe's Image"> <

我有一些代码,我试图调整悬停图像的大小,我想我需要添加一个类到它,但我一直在努力使它看起来平滑和实际工作。那么,我能把p-6改成p-5来达到我想要的效果吗

这是与图像相关的HTML标记:

<div class="col-lg-6 order-lg-2">
  <div class="p-5">
    <img class="img-fluid rounded-circle" src="img/joe.jpg" alt="Joe's Image">
  </div>
</div>

提前感谢您的帮助

我会用CSS动画解决这个问题,比如:

注意:我在下面使用了一个id,但是如果有很多图片,而不是你想这样做的唯一图片,那么课堂就是最好的选择

注2:当然你可以用JavaScript和jQuery来解决这个问题,如果你想这样做,请告诉我-我会更新答案

我的形象{ 宽度:90%; 填充:5%; 过渡:所有1; } 我的形象:悬停{ 宽度:100%; 填充:0%; } 仅使用JQuery,您就可以使用mouseenter和mouseleave事件的侦听器,还可以使用jqueryusing方法管理CSS属性。对于缩放元素,可以将CSS转换与transform:scale属性结合使用。检查下一个示例:

$document.readyfunction { $.img-wrapper.findimg.cstranslation,转换500毫秒输入输出; $.img-wrapper.hover //鼠标器处理器 作用 { $this.findimg.cstransform,scale1.2; }, //滑鼠夹持器 作用 { $this.findimg.cstransform,scale1; } ; };
我希望Jquery:你检查过我的答案了吗?这就是你需要的吗?