Set a background image using Global CSS?

您的看法很重要
回复
redfox
帖子: 64
注册时间: 2023年 10月 26日 21:15
来自: Czech Republic

Set a background image using Global CSS?

帖子 redfox »

Is there a possibility to set a background image for "blank new tab", using Global CSS?
I tried everything, but the page is still blank (white or black).
I even don't know where the global.css file is located, there is no such file in the user profile folder.
头像
catsxp
网站管理员
帖子: 3608
注册时间: 2022年 12月 26日 17:41

Re: Set a background image using Global CSS?

帖子 catsxp »

Since the blank page is set to be used, why use css to pollute it?
redfox
帖子: 64
注册时间: 2023年 10月 26日 21:15
来自: Czech Republic

Re: Set a background image using Global CSS?

帖子 redfox »

I want a clear newtab page, with my custom wallpaper, like I have had in Opera recently.
(Not the homepage with all the buttons and search field, which is the only other option, without using an extension.)

So, is there a possibility to set the newtab background image using global CSS, or not? Maybe Google still prohibits it in the API...

EDIT: For this purpose, I still use the extension "New Tab Background Image" from the Chrome Store... it works, but I think it isn't necessary to use an extension for such basic task. Using global CSS would be an elegant solution, not eating additional RAM resources.
上次由 redfox 在 2023年 11月 30日 08:14,总共编辑 1 次。
redfox
帖子: 64
注册时间: 2023年 10月 26日 21:15
来自: Czech Republic

Re: Set a background image using Global CSS?

帖子 redfox »

Now, I tried to enter this lime into the Global CSS:

/*Change NTP background*/ html[themegravity] {background:url(file:///D:/mypicrure.jpg) !important;}

but with no success.
头像
catsxp
网站管理员
帖子: 3608
注册时间: 2022年 12月 26日 17:41

Re: Set a background image using Global CSS?

帖子 catsxp »

For security reasons, it is not allowed for web pages to directly call local files
附件
185741.jpg
185741.jpg (62.86 KiB) 查看 9136 次
回复