Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/77.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 使用CSS/Javascript响应图像大小调整/裁剪_Jquery_Css - Fatal编程技术网

Jquery 使用CSS/Javascript响应图像大小调整/裁剪

Jquery 使用CSS/Javascript响应图像大小调整/裁剪,jquery,css,Jquery,Css,我正在尝试重新创建一个响应图像大小调整器/裁剪器,如位于的新闻滑块中所示。 我试图用DOM资源管理器重新创建代码,但它不起作用 它甚至不显示图像(当在body中设置时图像会显示,因此路径正确)。我在其他任何地方都没有找到像这样的尺寸调整器/裁剪器,这件看起来真的很不错。可能不需要这么多代码,但目前的情况如下: HTML: 对于大小调整器/裁剪器问题,我将研究。从这里开始,您只需要一个常规的滑块来更改背景图像。欢迎使用StackOverflow!在提问时,我们希望你遵守一些规则。首先:很好地格式化

我正在尝试重新创建一个响应图像大小调整器/裁剪器,如位于的新闻滑块中所示。 我试图用DOM资源管理器重新创建代码,但它不起作用

它甚至不显示图像(当在body中设置时图像会显示,因此路径正确)。我在其他任何地方都没有找到像这样的尺寸调整器/裁剪器,这件看起来真的很不错。可能不需要这么多代码,但目前的情况如下:

HTML:


对于大小调整器/裁剪器问题,我将研究。从这里开始,您只需要一个常规的滑块来更改背景图像。

欢迎使用StackOverflow!在提问时,我们希望你遵守一些规则。首先:很好地格式化你的代码!如有可能,请提供一份报告。第二,将HTML与CSS分开。第三,可能也是最重要的一点:解释你的问题:如果链接失效,没有人会理解你现在的问题。提供详细信息:您到底想要什么?回到主题:看一下
背景大小
,更具体地说是
包含的值
封面
。我在提供的链接上没有看到任何大小调整器或裁剪器。您只需要一个常规的滑块来更改背景图像。如何做到这一点?那不是答案。事实上,他根本没有要求滑球。他只是问了一下resizer/cropper,我回答了。我只是想他以后可能需要一个。
<!doctype html>
<html>
<head>
<title></title>
<link href="styles.css" rel="stylesheet" type="text/css">

<body>

<div id="container">

<!--<div id="header">
img src="images/fullhdlogo.png" class="logo"> 
</div> -->
<div id="container1">
<div id="container2">
<div id="container3">
<div id="container4">
<div id="container5">
<div id="container6">
<div id="container7">
<div id="imagecontainer" style="background-image: url (images/fullhdlogo.png);>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</body>
</html>
html    {
    margin:             0;
padding: 0;
width: 100%;
height: 100%; 
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;    
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing:border-box;  
 }

body    {
margin:             0;
padding: 0;
width: 100%;
height: 100%;
overflow-y: scroll;
overflow-x: hidden;
 }

 #container {

 }

  #header   {

width:              200px;
height:             100vh;  
background-color:   #62EF7F;



 }
 #container1{
  position: relative;
 top: 0px;
 left: 0px;
 width:  100%;
 height: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;    
-o-box-sizing: border-box;
-ms-box-sizing: border-box;
 box-sizing:border-box; 
 }

 #container2{
 position: relative;
 top: 0px;
 left: 0px;
 width:  100%;
 height: 100%;
 padding-top: 60px;
padding-bottom: 40px;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
 backface-visibility:hidden;
 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;   
 -o-box-sizing: border-box;
-ms-box-sizing: border-box;
 box-sizing:border-box; 
 }
 #container3{
 position: relative;
 width:  100%;
 height: 100%;
 min-height: 100%;
 -webkit-box-sizing: border-box;
-moz-box-sizing: border-box;    
 -o-box-sizing: border-box;
 -ms-box-sizing: border-box;
  box-sizing:border-box;    
   }  

   #container4{

position: fixed;
z-index: 10;
top: 60px;
left: 0;
bottom: 40px;
padding-right: 5px;
width: 66%;     
   }

   #container5 {

   position: absolute;
   width: 100%;
  height: 100%;
 -webkit-box-sizing: content-box;
 -moz-box-sizing: content-box;  
 -o-box-sizing: content-box;
 -ms-box-sizing: content-box;
  box-sizing:content-box;   
  overflow: hidden;
 background-color: inherit;

 }
 #container6{

 position: absolute;
  top: 0px;
   left: 0px;
 width: 100%;
 height: 100%;
overflow: hidden;
  background-color:inherit; 
 -webkit-box-sizing: border-box;
 -moz-box-sizing: border-box;   
-o-box-sizing: border-box;
 -ms-box-sizing: border-box;
 box-sizing:border-box;         
  }

  #container7{

 position: relative;
 width: 100%;
 height: 90%;
 display: block;
 background-repeat: no-repeat;
 background-position: center center;

 }

  imagecontainer {


  position: absolute;
  top: 0px;
 left: 0px;
 width: 100%;
 height: 100%;
 background: no-repeat center center;
 background-size: cover;

 }