I have a question_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:42:43
Original
1029 people have browsed it

$(".pe_xgtxB_r span").css("style","background:url(" json.path '190x190' json.localName ") no-repeat");
Why can't I give this SPAN? I imported this picture with json.path '190x190' json.localName spelled out to be the location of my picture


Reply to the discussion (solution)

Well
Please define the splicing path separately

var newUrl= json.path+'190x190'+json.localName;alert(newUrl);$(".pe_xgtxB_r span").css("background-image", newUrl);
Copy after login

$(".pe_xgtxB_r span").attr("style","background:url(" json.path '190x190' json.localName ") no-repeat");
or
$(".pe_xgtxB_r span").css({"background-image":"url(" json.path '190x190' json.localName ")","background -repeat":"no-repeat"});

It works well on both the 1st and 2nd floors

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template