Skip to main content

Misalignment of Preloader on iPhones

I have the following preloader:

/*--------------------------------------------------------------
# Preloader
--------------------------------------------------------------*/

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@500;700&family=Montserrat:wght@400;600&family=Oswald:wght@500&family=Pacifico&family=Roboto:ital,wght@0,400;0,900;1,500&display=swap');
.svg-file {
  width: 40vw;
  max-width: 133px;
}

.svg-file path {
  fill: transparent;
  stroke-width: 3;
  stroke: rgb(1, 36, 133);
}

.svg-file.z-logo path {
  stroke-dasharray: 550;
  stroke-dashoffset: 0;
}

.svg-file.z-logo path {
  animation: animate-zlogo 2s linear infinite;
}

.svg-file.z-logo svg {
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 1));
  transform: scale(2);
}

.svg-file h2 {
  font-family: "Roboto", cursive;
  transform: translate(0, 50px) skewX(-210deg) rotate(-6deg);
  font-size: 3em;
  color: #044d77;
}

.svg-file span {
  animation: dots 2.5s steps(6, end) infinite;
  font-size: 5em;
  display: block;
  transform: translate(0, 65px) skewX(-210deg) rotate(-6deg);
  background-color: rgb(5, 46, 80);
  width: 8px;
  height: 5px;
}

@keyframes fadein-fadeout {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes animate-zlogo {
  0% {
    stroke-dashoffset: -50;
  }
  20% {
    stroke-dashoffset: 550;
    fill: transparent;
  }
  40% {
    fill: transparent;
    stroke-dashoffset: 1100;
  }
  60% {
    stroke-dashoffset: 1100;
    fill: #05f7f9;
  }
  80% {
    stroke-width: 0;
    fill: #05f7f9;
  }
  100% {
    /* stroke-dashoffset: 0; */
    stroke-width: 3;
    fill: transparent;
  }
}

#preloader {
  position: fixed;
  z-index: 9999;
  overflow: hidden;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  align-content: center;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
}

.z-logo svg {
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  margin: auto;
  justify-content: center;
  align-items: center;
  align-content: center;
  position: relative;
  display: flex;
  width: 50%;
}

.z-logo::before {
  content: "";
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  margin: auto;
  background: black;
  position: absolute;
  display: inline-flex;
  border: 1px solid black;
  width: 60vw;
  max-width: 200px;
  height: 60vw;
  max-height: 200px;
}
<!-- Preloader -->
<div id="preloader">
  <div class="svg-file z-logo">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 133 133" width="133" height="133">
        <g id="H">
          <path
            d="M45.33 78.22L87.67 78.22L87.67 133L121.05 133L121.05 0L87.67 0L87.67 49.33L45.33 49.33L45.33 0L11.95 0L11.95 133L45.33 133L45.33 78.22Z"
            fill="#47AF9A" />
        </g>
      </svg>
  </div>
</div>

This seems to work fine on Android devices such as Samsung phones...etc. However, for some reason, the width of the letter "H" gets misaligned on iPhone devices such as iPhone 14, as shown below:

enter image description here

I have included the Meta tag and tried every solution such as modifying the .svg-file.z-logo class and adding these properties:

  display: flex;
  justify-content: center;
  align-items: center;

This still does not fix the issue. Any help would be highly appreciated! Thanks.

Via Active questions tagged javascript - Stack Overflow https://ift.tt/azCTM7e

Comments

Popular posts from this blog

Confusion between commands.Bot and discord.Client | Which one should I use?

Whenever you look at YouTube tutorials or code from this website there is a real variation. Some developers use client = discord.Client(intents=intents) while the others use bot = commands.Bot(command_prefix="something", intents=intents) . Now I know slightly about the difference but I get errors from different places from my code when I use either of them and its confusing. Especially since there has a few changes over the years in discord.py it is hard to find the real difference. I tried sticking to discord.Client then I found that there are more features in commands.Bot . Then I found errors when using commands.Bot . An example of this is: When I try to use commands.Bot client = commands.Bot(command_prefix=">",intents=intents) async def load(): for filename in os.listdir("./Cogs"): if filename.endswith(".py"): client.load_extension(f"Cogs.{filename[:-3]}") The above doesnt giveany response from my Cogs ...

How to show number of registered users in Laravel based on usertype?

i'm trying to display data from the database in the admin dashboard i used this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count(); echo $users; ?> and i have successfully get the correct data from the database but what if i want to display a specific data for example in this user table there is "usertype" that specify if the user is normal user or admin i want to user the same code above but to display a specific usertype i tried this: <?php use Illuminate\Support\Facades\DB; $users = DB::table('users')->count()->WHERE usertype =admin; echo $users; ?> but it didn't work, what am i doing wrong? source https://stackoverflow.com/questions/68199726/how-to-show-number-of-registered-users-in-laravel-based-on-usertype

Where and how is this Laravel kernel constructor called? [closed]

Where and how is this Laravel kernel constructor called? public fucntion __construct(Application $app, $Router $roouter) { } I have read the documentation and some online tutorial but I can find any clear explanation. I am learning Laravel and I am wondering where does this kernel constructor receives its arguments from. "POSTMOTERM" CLARIFICATION: Here is more clarity.I have checked the boostrap/app.php and it is only used for boostrapping the interfaces into the container class. What is not clear to me is where and how the Kernel class is instatiated and the arguments passed to the object calling the constructor.Something similar to; obj = new kernel(arg1,arg2) or, is the framework using some magic functions somewhere? Special gratitude to those who burn their eyeballs and brain cells on this trivia before it goes into a full blown menopause alias "MARKED AS DUPLICATE". To some of the itchy-finger keyboard warriors, a.k.a The mods,because I believe in th...