Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.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
Javascript 自举图像缩放_Javascript_Jquery_Asp.net_Angular Ui Bootstrap_Zooming - Fatal编程技术网

Javascript 自举图像缩放

Javascript 自举图像缩放,javascript,jquery,asp.net,angular-ui-bootstrap,zooming,Javascript,Jquery,Asp.net,Angular Ui Bootstrap,Zooming,我正在做一个电子商务网站。我正在使用引导。在执行产品详细信息页面时,我应该使用什么?我希望它是这样的 我希望在图片方面图片能够增长。这里我有一些代码,可以帮助您使用纯CSS增长图像 CSS HTML 演示 以下是一个工作示例 这是html <p>Background image:</p> <div class="zoom-bg"></div> <p>Using nested image and <co

我正在做一个电子商务网站。我正在使用引导。在执行产品详细信息页面时,我应该使用什么?我希望它是这样的


我希望在图片方面图片能够增长。

这里我有一些代码,可以帮助您使用纯CSS增长图像

CSS

HTML


演示


以下是一个工作示例

这是
html

<p>Background image:</p>

<div class="zoom-bg"></div>

<p>Using nested image and <code>object-fit</code>:</p>

<div class="zoom-img">
  <img src="https://placeimg.com/300/200/arch">
</div>
这是css

.zoom-bg {
  width: 300px;
  height: 200px;
  overflow: hidden;
}

.zoom-bg:before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: url(https://placeimg.com/300/200/nature) no-repeat center;
  background-size: cover;
  transition: all .3s ease-in-out;
}

.zoom-bg:hover:before {
  transform: scale(1.2);
}

.zoom-img {
  width: 300px;
  height: 200px;
  overflow: hidden;
}

.zoom-img > img {  
  object-fit: cover;
    width: 100%;
    height: 100%;
  transition: all .3s ease-in-out;
}

.zoom-img:hover > img {
  transform: scale(1.2);
}

检查

中的工作示例,图像应为2格式。我是说,一个小尺寸的指甲。还有一个大的。单击小图像,即图像的
缩略图
,需要显示大图像。要实现这一点,还需要Jquery和CSS。请搜索,是否有Jquery插件可以执行此操作。
<p>Background image:</p>

<div class="zoom-bg"></div>

<p>Using nested image and <code>object-fit</code>:</p>

<div class="zoom-img">
  <img src="https://placeimg.com/300/200/arch">
</div>
.zoom-bg {
  width: 300px;
  height: 200px;
  overflow: hidden;
}

.zoom-bg:before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: url(https://placeimg.com/300/200/nature) no-repeat center;
  background-size: cover;
  transition: all .3s ease-in-out;
}

.zoom-bg:hover:before {
  transform: scale(1.2);
}

.zoom-img {
  width: 300px;
  height: 200px;
  overflow: hidden;
}

.zoom-img > img {  
  object-fit: cover;
    width: 100%;
    height: 100%;
  transition: all .3s ease-in-out;
}

.zoom-img:hover > img {
  transform: scale(1.2);
}