damir77716
@damir77716
Не адекватный инноватор

Почему svg нормально отображается в браузере?

вот код
сгенерировал в python е
сохраняю в html в браузере нормально отображается
но когда меняю формат на svg все едет
(когда меняю формат у других (скаченных) svg то они и так и так отображаються)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg version="1.1" width="670" height="670">
    <defs>
    <g>
        <line x1="630" y1="30" x2="630" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="600" y1="30" x2="600" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="570" y1="30" x2="570" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="540" y1="30" x2="540" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="510" y1="30" x2="510" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="480" y1="30" x2="480" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="450" y1="30" x2="450" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="420" y1="30" x2="420" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="390" y1="30" x2="390" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="360" y1="30" x2="360" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="330" y1="30" x2="330" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="300" y1="30" x2="300" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="270" y1="30" x2="270" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="240" y1="30" x2="240" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="210" y1="30" x2="210" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="180" y1="30" x2="180" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="150" y1="30" x2="150" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="120" y1="30" x2="120" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="90" y1="30" x2="90" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="60" y1="30" x2="60" y2="630" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="30" x2="30" y2="630" stroke="#cccccc" stroke-width="1" ></line>
    </g>
    <g>
        <line x1="30" y1="30" x2="630" y2="30" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="60" x2="630" y2="60" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="90" x2="630" y2="90" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="120" x2="630" y2="120" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="150" x2="630" y2="150" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="180" x2="630" y2="180" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="210" x2="630" y2="210" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="240" x2="630" y2="240" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="270" x2="630" y2="270" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="300" x2="630" y2="300" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="330" x2="630" y2="330" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="360" x2="630" y2="360" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="390" x2="630" y2="390" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="420" x2="630" y2="420" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="450" x2="630" y2="450" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="480" x2="630" y2="480" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="510" x2="630" y2="510" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="540" x2="630" y2="540" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="570" x2="630" y2="570" stroke="#cccccc" stroke-width="1"></line>
        <line x1="30" y1="600" x2="630" y2="600" stroke="#cccccc" stroke-width="1" ></line>
        <line x1="30" y1="630" x2="630" y2="630" stroke="#cccccc" stroke-width="1" ></line>
    </g>
    <g>
        <line x1="30" y1="330" x2="660" y2="330" stroke="#000000" stroke-width="1" ></line>
        <text x="640" y="320" id="GraphContainerGraphAxisXName" font-size="20" fill="black">X</text>
        <line x1="330" y1="630" x2="330" y2="0" stroke="#000000" stroke-width="1"></line>
        <text x="340" y="20" id="GraphContainerGraphAxisYName" font-size="20" fill="black">Y</text>
        <polyline points="630,320
                          660,330
                          630,340
                          640,330
                          630,320" fill="black" shape-rendering="geometricPrecision">
        </polyline>
        <polyline points="320,30
                          330,0
                          340,30
                          330,20
                          320,30" fill="black" shape-rendering="geometricPrecision">
        </polyline>
    </g>
    <g id="FuncGroup0">
    <circle cx="180" cy="450" r="2" fill="rgb(67,67,72)" stroke="rgb(67,67,72)" stroke-width="1"></circle>
    <circle cx="330" cy="480" r="2" fill="rgb(67,67,72)" stroke="rgb(67,67,72)" stroke-width="1"></circle>
    <circle cx="450" cy="450" r="2" fill="rgb(67,67,72)" stroke="rgb(67,67,72)" stroke-width="1"></circle>
    <circle cx="540" cy="510" r="2" fill="rgb(67,67,72)" stroke="rgb(67,67,72)" stroke-width="1"></circle>
    <path d="M30,480
     C105.0,465.0 105.0,450
    180,450
     C255.0,450 255.0,480
    330,480
     C390.0,480 390.0,450
    450,450
     C495.0,450 495.0,510
    540,510
     C585.0,510 585.0,450.0
    630,390" fill="none" stroke="rgb(67, 67, 72)" stroke-width="1"></path>
    </g>
    </defs>
</svg>

  • Вопрос задан
  • 232 просмотра
Решения вопроса 1
damir77716
@damir77716 Автор вопроса
Не адекватный инноватор
xmlns="www.w3.org/2000/svg"
нехватало этой строчки
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
petermzg
@petermzg
Самый лучший программист
Наверное надо viewBox прописать
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы