簡體   English   中英

背景圖片未在CSS和HTML中顯示

[英]Background image not showing in CSS and HTML

我試圖在我的網站上放置一個平鋪星系的背景圖像,但是顯示的只是紅色。 我試過刪除背景色,但它只顯示白色。 我環顧四周,但是我不確定自己在做什么錯。 這是我的代碼:

<style>
body {background-color:#800000;background- 
image:url("https://srv4.imgonline.com.ua/result_img/imgonline-com-ua- 
TextureSeamless-6dnmvt65oVOZjthV.png");
background-repeat:repeat;background-position:center center;
background-attachment:scroll;}
</style>

有什么建議嗎?

您正在尋找的圖片在以下網址上不可用

https://srv4.imgonline.com.ua/result_img/imgonline-com-ua- 
TextureSeamless-6dnmvt65oVOZjthV.png

例如,您可以嘗試如下操作:

 html{ background: url('https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png') no-repeat 0 0 scroll; background-color:#0C0C0C; background-size: 100% 100%; height:100%; width:100%; } 

您的圖片鏈接已損壞。

請嘗試使用其他鏈接,因為您的語法在CSS中是正確的。

這是一個示例圖像鏈接: https : //thumb1.shutterstock.com/thumb_large/1479467/543360034/stock-photo-close-up-of-milky-way-galaxy-with-stars-and-space-dust-in -the-universe-long-exposure-photograph-543360034.jpg

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM