首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的网站中关于标题的奇怪的bug

我的网站中关于标题的奇怪的bug
EN

Stack Overflow用户
提问于 2018-07-12 12:46:57
回答 1查看 52关注 0票数 0

我已经发布了我的个人网站,但对于手机用户来说似乎有一个奇怪的bug。当我在我的PC上的“检查元素”中验证网站时。一切似乎都很好,但在我的iPhone上,情况就不同了。

“我用电脑做很酷的事情”这句话似乎把"s“去掉了,这很烦人。我尝试过除虫,但都不起作用。

另外,在底部的“联系我”部分,背景中的图片被无缘无故地放大了?

GitHub Full Code

My Website

What happens

Zoomed in background?

HTML:

代码语言:javascript
复制
<p class="line-1 anim-typewriter">hi, i'm mohanad</p>
<p class="line-2 anim-typewriter2">i do cool things with computers</p>

CSS:

代码语言:javascript
复制
.line-2{
font-family: monospace;
position: relative;
top: 30%;
left: 15%;
width: 25em;
margin: 0 auto;
font-size: 250%;
text-align: left;
white-space: nowrap;
overflow: hidden;
transform: translateY(-50%);
}

.anim-typewriter2{
 animation: typewriter2 2s steps(44) 1s 1 normal both,
     blinkTextCursor2 500ms steps(44) infinite normal;
     animation-delay: 3.5s;
 }
 @keyframes typewriter2 {
 from {
 width: 0;
 }

 to {
 width: 21em;
 }
 }
 @keyframes blinkTextCursor2 {
 from {
  border-right-color: rgba(255,255,255,.75);
  }
  to {
  border-right-color: transparent;
  }
 }
EN

回答 1

Stack Overflow用户

发布于 2018-07-12 13:32:57

嗯,我想问题不在于“我用电脑做很酷的事情”这句话。您的HTML结构没有覆盖整个页面,这是由于以下样式造成的

代码语言:javascript
复制
.container {
    width: 90%;
    margin: auto;
    overflow: hidden;
}

将容器宽度更改为100%,以使其在响应视图之间工作。此外,将您的HTML更改为:

代码语言:javascript
复制
<header id="home">
          <nav class="">
             <div class="menu-icon lightSpeedIn animated">
                <i class="fa fa-bars fa-2x"></i>
              </div>
               <div class="logo fadeIn animated">MOHANAD ARAFE</div>
               <div class="menu lightSpeedIn animated" data-wow-delay="1s">
                    <ul>
                      <li><a href="#home">Home</a></li>
                      <li><a href="#portfolio">Portfolio</a></li>
                      <li><a href="#contact">Contact</a></li>
                    </ul>
              </div>
          </nav>
<div class="container">
          <p class="line-1 anim-typewriter">hi, i'm mohanad</p>
          <p class="line-2 anim-typewriter2">i do cool things with computers</p>
          <div class="readMore wow fadeIn" data-wow-delay="5.7s" style="visibility: visible; animation-delay: 5.7s; animation-name: fadeIn;">
            <a href="#aboutme"><h3>Read More</h3></a>
            <img src="./img/arrowDown.png" alt="Arrow Down">
          </div>
          <div class="location">griffith observatory, ca</div>
</div>
      </header>

请尝试这些更改,它可能会改变您的一些原始样式。我们可以在下一个版本中修复它们。

联系HTML:

代码语言:javascript
复制
    <section id="contact">
  <div class="container">
    <center>
    <h1>LET'S BUILD TOGETHER</h1>
    <p>If you need a website or any designs, feel free to contact me so we can design together! Also, if you see any bugs
      in the website, please let me know so I can fix it. Otherwise, if you just want to talk, shoot me an email!
      <form class="contact-form" action="contact.php" method="post">
        <input type="text" name="name" class="form-control" placeholder="Name" required><br>
        <input type="email" name="email" class="form-control" placeholder="Email" required><br>
        <input type="subject" name="subject" class="form-control" placeholder="Subject" required><br>
        <textarea name="message" class="form-control" rows="4" placeholder="Message" required></textarea><br>
        <button type="submit" name="submit" class="form-control submit">SEND MESSAGE</button>
      </form>
    </center>
  </div>
</section>

CSS:

代码语言:javascript
复制
#contact{
background: url('../img/contactBg.jpg');
background-size: cover;
background-attachment: fixed;
background-position:left;
padding-top: 20px;
padding-bottom: 20px;
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51297452

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档