dqypcghd381390 2018-07-04 16:41
浏览 204

如何在wordpress中为客户端制作“background:url(”“)(CSS)可自定义的图像

I have this in my style.css

.showcase{

   background: url("x.jpg") no-repeat 0;

}

I have the website on wordpress. And i have advanced custom fields so that the client can change text on the website. But I can't seem to figure out how to do it for this CSS backround image.

The "additional CSS" part in WordPress doesn't work as it wants my style.css to be placed above bootstrap in index.php which causes a mess in itself. And it is also unfriendly towards non-developers, which is the part I cannot go forward with.

Please keep in mind that I have no experience using WordPress and am only converting a html static website to a WordPress one with some customisation enabled for the client. All of it is done except the images.

  • 写回答

1条回答 默认 最新

  • dongtan3306 2018-07-04 16:50
    关注

    upload the image in the gallery, get the absolute URL of the image

    .backgroundImage {
      height:500px;
      background-image: url("https://c1.staticflickr.com/9/8294/7597202086_aa54c17b83_b.jpg");
    }
    <div class="backgroundImage">Background Image</div>

    </div>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services