Reputation: 1
Good day to everyone! I'm new here & in web design. Have some problem with my study project. In my study material (website), logo showing well, but once I change image in original *.svg file it disappears. Try searching the web, but all solutions was not help me. This is how logo looks in study materials
Here is my html code
<!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="css/main.css">
<script src="js/app.js" defer></script>
<script src="libs/rain.js" defer></script>
</head>
<body>
<div class="logo" style="background-image: url(/img/logo.svg);"></div>
<section class="layers">
<div class="layers__container">
<div class="layers__item layer-1" style="background-image: url(/img/layer-1.jpg);"></div>
<div class="layers__item layer-2">
<div class="hero-content">
<h1>Red Maple Leaf<span>Studios</span></h1>
<div class="hero-content__p">Creating a beautiful 3D website with a ‘lens effect’</div>
<button class="button-start">Exlore music</button>
</div>
</div>
<div class="layers__item layer-4">
<canvas class="rain"></canvas>
</div>
<div class="layers__item layer-5" style="background-image: url(img/layer-5.png);"></div>
</div>
</section>
</body>
</html>
And here is my css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--index: calc(1vw + 1vh);
--transition: 1.5s cubic-bezier(.05, .5, 0, 1);
}
@font-face {
font-family: kamerik-3d;
src: url(../fonts/kamerik205-heavy.woff2);
font-weight: 900;
}
@font-face {
font-family: merriweather-italic-3d;
src: url(../fonts/merriweather-regular-italic.woff2);
}
body {
background-color: #000;
color: #7c222a;
font-family: kamerik-3d;
}
.logo {
--logo-size: calc(var(--index) * 7.8);
width: var(--logo-size);
height: var(--logo-size);
background-repeat: no-repeat;
position: absolute;
left: calc(51% - calc(var(--logo-size) / 2));
top: calc(var(--index) * 2.8);
z-index: 1;
}
.layers {
perspective: 1000px;
overflow: hidden;
}
.layers__container {
height: 100vh;
min-height: 500px;
transform-style: preserve-3d;
transform: rotateX(var(--move-y)) rotateY(var(--move-x));
will-change: transform;
transition: transform var(--transition);
}
.layers__item {
position: absolute;
inset: -5vw;
background-size: cover;
background-position: center;
display: flex;
align-items: center;
justify-content: center;
}
.layer-1 {
transform: translateZ(-55px) scale(1.06);
}
.layer-5 {
transform: translateZ(300px) scale(.9);
}
.hero-content {
font-size: calc(var(--index) * 2.9);
text-align: center;
text-transform: uppercase;
letter-spacing: calc(var(--index) * -.15);
line-height: 1.35em;
margin-top: calc(var(--index) * 5.5);
}
.hero-content span {
display: block;
}
.hero-content__p {
text-transform: none;
font-family: merriweather-italic-3d;
letter-spacing: normal;
font-size: calc(var(--index) * .73);
line-height: 3;
}
.button-start {
font-family: Arial;
font-weight: 600;
text-transform: uppercase;
font-size: calc(var(--index) * .71);
letter-spacing: -.02vw;
padding: calc(var(--index) * .7) calc(var(--index) * 1.25);
background-color: transparent;
color: #7c222a;
border-radius: 10em;
border:#7c222a (255 255 255 / .4) 3px solid;
outline: none;
cursor: pointer;
margin-top: calc(var(--index) * 2.5);
}
.layer-4, .layer-5 {
pointer-events: none;
}
If problem in svg format, could you please advise helpful solution for me. Maybe I can change something in this code. Thank you!
I try to search web, but all solutions that I find there, was not help me. I'm looking for the help & for solution. I want understand one thing, problem in this *.svg file or in my code.
Upvotes: 0
Views: 86