Website zeigt keinen hintergrund?

2 Antworten

Ich hab mir den Code nicht groß angesehen. Klassische Fehler sind:

Das Bild heißt anders, als angegeben.

MyDrugs.jpeg ist nicht dasselbe wie mydrugs.jpeg und auch nicht dasselbe wie MyDrugs.jpg.


whoami5496 
Fragesteller
 19.04.2022, 18:00

Eigentlich war es doch richtig oder? Ich habe geschrieben "MyDrugs.jpeg"

und das bild name ist auch "MyDrugs.jpeg"

0
421054  19.04.2022, 18:01
@whoami5496

Ob es korrekt war, kann ich nicht wissen. Ich sehe nur den Code, nicht das reale Bild im Explorer.

1
whoami5496 
Fragesteller
 19.04.2022, 18:03
@421054

Ja, Im Explorer hab ich nochmal nachgeguckt Und da steht "MyDrugs.jpeg" Genau so wie im code.

0
421054  19.04.2022, 18:07
@whoami5496

Setze mal alles in den Klammern nach url in Anführungszeichen.

0
whoami5496 
Fragesteller
 19.04.2022, 18:09
@421054

Wird mir als Error angezeigt. Und funktionieren tut es auch nicht.

0
whoami5496 
Fragesteller
 19.04.2022, 18:14
@421054

Habe auch ein tutorial auf YouTube angeguckt, und ich habe es so gemacht wie er.

0
CSS Syntax
background-image: linear-gradient( directioncolor-stop1color-stop2, ...);
ValueDescription directionDefines a starting point and a direction (or an angle) along with the gradient effect. color-stop1, color-stop2,...Color stops are the colors you want to render smooth transitions among. This value consists of a color value, followed by an optional stop position (a percentage between 0% and 100% or a length along the gradient axis).

wieso also machst du nicht was da steht .

linear-gradient(to top, rgba(0, 0, 0, 0.5),50%, rgba(0,0,0,0.5),50%)

wie kommst du darauf das 50% eine farbe ist ,

A COLOR FOLLOWED BY percent , also wenn dann sowas

linear-gradient(to top, rgba(0, 0, 0, 0.5) 50%, rgba(0,0,0,0.5) 50%)

und dann ist es auch   background-image

https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient

einfach mal sauber arbeiten

hier das online beispiel:

https://jsfiddle.net/gp5v24wr/2/


whoami5496 
Fragesteller
 19.04.2022, 18:26

Geht immernoch nicht.

0