且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将背景图像添加到wordpress导航栏

更新时间:2023-01-05 20:09:08

,在其底部添加此代码:
 .navbar {
background-image:url(https://ringgeorge.com/wp-content/uploads/2017/07/Handphone-7.jpg)
}


I am working on website built using wordpress and a purchased theme.
The website url is www.ringgeorge.com
I would like to add a background image to the website navigation bar.

What I have tried:

I am using the customiser to add a custom code to the CSS.
This is code that I had inserted and published.

#noo-header.noo-header{background-image:url("
https://ringgeorge.com/wp-content/uploads/2017/07/Handphone-7.jpg";}

The image was already uploaded in the wordpress site's media library. The url was obtained from this library.

This did not work.Please advise.

in the custom.css file, add this code at the bottom of it:
.navbar {
   background-image: url("https://ringgeorge.com/wp-content/uploads/2017/07/Handphone-7.jpg")
}