1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Clarified that tutorial background image should be self-provided.

This commit is contained in:
Adam Johnson 2022-03-08 05:28:56 +00:00 committed by GitHub
parent 58d357fc65
commit 76fda7729e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,17 +94,19 @@ Adding a background-image
========================= =========================
Next, we'll create a subdirectory for images. Create an ``images`` subdirectory Next, we'll create a subdirectory for images. Create an ``images`` subdirectory
in the ``polls/static/polls/`` directory. Inside this directory, put an image in the ``polls/static/polls/`` directory. Inside this directory, add any image
called ``background.gif``. In other words, put your image in file that you'd like to use as a background. For the purposes of this tutorial,
``polls/static/polls/images/background.gif``. we're using a file named ``background.png``, which will have the full path
``polls/static/polls/images/background.png``.
Then, add to your stylesheet (``polls/static/polls/style.css``): Then, add a reference to your image in your stylesheet
(``polls/static/polls/style.css``):
.. code-block:: css .. code-block:: css
:caption: polls/static/polls/style.css :caption: polls/static/polls/style.css
body { body {
background: white url("images/background.gif") no-repeat; background: white url("images/background.png") no-repeat;
} }
Reload ``http://localhost:8000/polls/`` and you should see the background Reload ``http://localhost:8000/polls/`` and you should see the background