스타일 추가

k_hyun·2022년 11월 23일
0

index.html

{% load static %}

<link rel="stylesheet" href="{% static 'polls/style.css' %}">

...

상단에 위의 코드를 추가함으로써 polls/static/polls/style.css 를 참고한다.

style.css

li a{
    color: green;
    background: white url("images/background.png") no-repeat;
}

실행 결과


글자가 초록색으로 바뀌고, 이미지가 추가되었다.

이미지의 위치는 polls/static/polls/images/... 이다.

0개의 댓글