lundi 5 juillet 2021

Why does SVG not show up in google chrome?

I am making a website in HTML, CSS and JS. I want to put my logo in the nav bar, but this shows up in Google Chrome:

Google chrome error:

enter image description here

In Safari, it works perfectly fine:

enter image description here

This is my code in HTML:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <header>
        <img src="images/logo.svg">
        <nav>
            <ul class="nav_links">
                <li><a href="#">Home</a></li>
                <li><a href="#">Messages</a></li>
                <li><a href="#">Explore</a></li>
            </ul>
        </nav>
        <a href="#" class="cta"><button>Profile</button></a>
    </header>
</body>
</html>

And this is my code in the svg file:

<?xml version="1.0" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 139.512 36" width="139.512" height="36"><g fill="#ffe500" color="#ffe500" transform="translate(0 4.297872340425533) scale(0.5957447)"><svg width="47.0" height="46.0" x="0.0" y="0.0" viewBox="0 0 47 46"><path fill="currentColor" fill-rule="nonzero" 
d=............ transform="translate(36, 9.12)"></path></svg>

Does anyone know how to solve this problem?

Thanks in advance!




Aucun commentaire:

Enregistrer un commentaire