所以我正在从某人的网站上工作。无法管理从css编辑课程
它具有以下几行代码。
<div class="parallax image-container anim-css" style="background-image: url("image_url");
background-position: 50% 0px;"></div>
所以我不能设法改变图像的URL从CSS,有人有任何想法?
所以我正在从某人的网站上工作。无法管理从css编辑课程
它具有以下几行代码。
<div class="parallax image-container anim-css" style="background-image: url("image_url");
background-position: 50% 0px;"></div>
所以我不能设法改变图像的URL从CSS,有人有任何想法?
那是因为你有内嵌样式在你的标签,它有一个优先级比类的更多,你也已经一个报价问题,您应该使用事务所报价'
:
<div ..."background-image: url('http://lifehacking.nl/wp-content/uploads/google-logo.jpg'); background-position: 50% 0px;"></div>
_______________________________^________________________________________________________^
你可以使用!important
强制类图片来代替:
.new-image{
background-image: url('http://bit.do/logo124578') !important;
}
但它不是一个很好的做法,你可能要到类之间切换,当你想改变background-image
和所有像删除内嵌样式:
.old-image{
background-image: url('old_img_url') !important;
}
.new-image{
background-image: url('new_img_url') !important;
}
<div class="parallax image-container anim-css old-image"></div>
<div class="parallax image-container anim-css new-image"></div>
希望这会有所帮助。
什么应该是正确的CSS处理图像akhi? –
这是在WordPress上,我找不到正确的PHP文件。这是我认为的买过的主题,而且非常糟糕。所以我不知道如何编辑html。 –
确定你有两个选择,如果你可以到达css文件然后用'!important'改变它(或者只是创建你自己的类并在它们之间切换检查我更新的答案),否则你可以改变内联代码的背景。 –
简答:你不能。删除内联样式属性,修复你的报价,你会没事的。 – rafaelcastrocouto
@rafaelcastrocouto这是在WordPress上,我找不到正确的PHP文件。这是我认为的买过的主题,而且非常糟糕。所以我不知道如何编辑html。 –
如果你买了它,然后向卖你的人寻求帮助。 – rafaelcastrocouto