Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/394.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
Java 如何设置背景重复:在element.style中不重复_Java_Jquery_Css - Fatal编程技术网

Java 如何设置背景重复:在element.style中不重复

Java 如何设置背景重复:在element.style中不重复,java,jquery,css,Java,Jquery,Css,关于以下内容 <div style="display: block; background: rgba(0, 0, 0, 0) url("/wp-content/uploads/2018/05/south_carolina.png";) repeat scroll 0% 0%; position: relative; padding: 0px; width: 615px; height: 615px;">

关于以下内容

<div style="display: block; background: rgba(0, 0, 0, 0) 
            url("/wp-content/uploads/2018/05/south_carolina.png";) 
            repeat scroll 0% 0%; position: relative; padding: 0px; 
            width: 615px; height: 615px;">

这是背景的简写。其中显示
repeat
更改为
no repeat


元素{显示:块;背景:rgba(0,0,0,0)url(“/wp content/uploads/2018/05/south_carolina.png”)不重复滚动0%0%;位置:相对;填充:0px;宽度:615px;高度:615px;}

在同一行中?使用
禁止重复

element { display: block; background: rgba(0, 0, 0, 0) url("/wp-content/uploads/2018/05/south_carolina.png") no-repeat scroll 0% 0%; position: relative; padding: 0px; width: 615px; height: 615px; }
或者使用jQuery:

$('element-selector').css('background-repeat', 'no-repeat');
其中
元素选择器
是用于选择元素的css查询

$('element-selector').css('background-repeat', 'no-repeat');