I am currently working on a project that involves using a background image. However, I am facing some difficulties in trying to fully center the image, similar to what is shown in this
My objective is
https://i.sstatic.net/XUNTy.png
What I have achieved so far is
https://i.sstatic.net/MibEx.jpg
As you can observe, the image is not perfectly centered vertically and when the screen is resized, the pencil tends to disappear.
Here you can view the image in question. https://i.sstatic.net/bUfLB.jpg
Below is the CSS code being used:
.app {
height: 100%;
background: url('./background.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
A big thank you to anyone who can provide assistance.
.app {
height: 100%;
background: url('https://laaouatni.github.io/w11-clone/images/1dark.jpg') no-repeat center center fixed;
background-size: cover;
}
<!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 class="app">
</body>
</html>