最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Inserting a background-image

programmeradmin1浏览0评论

I would like all my site pages to have a background-image, such as:

body {
  background-image: url(.jpg);
  background-size: cover;
}

Using additional CSS field does not work. What can be the solution, please? Thank you

I would like all my site pages to have a background-image, such as:

body {
  background-image: url(https://5e97-e8af726b4e97.wptiger.fr/wp-content/themes/twentyseventeen/assets/images/header.jpg);
  background-size: cover;
}

Using additional CSS field does not work. What can be the solution, please? Thank you

Share Improve this question edited Jun 6, 2020 at 13:22 m4n0 1,36410 silver badges22 bronze badges asked Jun 6, 2020 at 9:11 Guillaume BuizardGuillaume Buizard 91 bronze badge 1
  • Welcome to WordPress Development. I hope you find the answer(s) you are looking for. Our site is different from most - if you have not done so yet, consider checking out the tour and help center to find out how things work. – Matthew Brown aka Lord Matt Commented Jun 6, 2020 at 15:07
Add a comment  | 

1 Answer 1

Reset to default 0

I think your CSS is OK, (I am not an expert at CSS but I am currently learning it myself).

I think you issue is a cerficate error on the page you are hosting

try this:


body {background-image: url("https://image.shutterstock/image-vector/sample-stamp-grunge-texture-vector-600w-1389188336.jpg");
        background-size:cover;}

I tested it in the additional CSS on my page and it worked.

I also added it to my stylesheet in my child theme and that also worked.

Hope that helps!

Cheers.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论