Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.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
带有css属性的用户jquery_Jquery_Css - Fatal编程技术网

带有css属性的用户jquery

带有css属性的用户jquery,jquery,css,Jquery,Css,是否可以使用CSS在jQuery函数中插入多个属性?对我来说,有必要在CSS中插入多个更改 例如,如果要更改宽度和高度,可以执行以下操作: <script>$(this).css("height","200");</script> $(this.css(“高度”,“200”); 但是如果我想插入相同的宽度和高度 我尝试使用单独的函数和工作方式来执行此操作,但在内部无需查看示例,无需每次打开新函数是: $(this).css({ "height" : "200", "w

是否可以使用CSS在jQuery函数中插入多个属性?对我来说,有必要在CSS中插入多个更改

例如,如果要更改宽度和高度,可以执行以下操作:

<script>$(this).css("height","200");</script>
$(this.css(“高度”,“200”);
但是如果我想插入相同的宽度和高度

我尝试使用单独的函数和工作方式来执行此操作,但在内部无需查看示例,无需每次打开新函数

是:

$(this).css({ "height" : "200", "width" : "200" });

具体来说,请阅读本文档的这一部分!这应该会给你提供相当数量的资源

$(this.css({“height”:x,“width”:y})