html - 我的 CSS/HTML 有一个明显的重大缺陷

标签 html css

谁能帮我弄清楚这个 css 有什么问题?它不会在任何浏览器中加载。前几天它正在加载,我不知道我最近 super 改变了什么来摧毁它。现在显然堆栈溢出要我在发布之前添加更多详细信息,我不知道还能做什么大声笑。编辑:现在我原来的问题已经解决了,但是出现了一个新问题,现在我的页面的高度和宽度上有额外的空间,现在看来是一个 HTML 问题。编辑:现在看来问题出在所有 .Text 类的 CSS 中。

body {

    background: url(http://i.imgur.com/EpgMwgC.jpg) no-repeat center center fixed;
        background-size: cover;
        -webkit-background-size: cover;
        -moz-background-size: cover;
        -o-background-size: cover;
        margin: 0;
        padding: 0;
        height: auto;
        max-width: 900px;

     }

/*http://i.imgur.com/p7f9wMQ.jpg*/


hr {

    position: relative;
    width: 500px;
    left: 257px;
    bottom: -20px;
    display: block;
    border-color: #666;
}

div {

    width: 100%;
    height: 100%;
    min-width: 1000px;
    min-height: 1000px;
    margin: 0 auto;

}

.ProvidenceTxt {

    position: relative;
    top: 100px;
    left: 490px;

}

.ReformedTxt {

    position: relative;
    top: -10px;
    left: 756px;

}

.ChurchTxt {

    position: relative;
    top: -40px;
    left: 550px;

}

.BoiseTxt {

    position: relative;
    top: -150px;
    left: 758px;

}



#YoutubeImg {

position: relative;
width: 150px;
top: -110px;
left: 550px;


}

#FacebookImg {

position: relative;
width: 73px;
top: -134px;
left: 610px;

}

.YoutubeVidBoi {

    position: relative;
    left: 430px;
    top: -10px;

}

HTML:

    <!DOCTYPE html>
    <html>

    <link rel="stylesheet" type="text/css" href="main.css" charset="utf-8">
    <link rel="stylesheet" href="textstyle.css" type="text/css" charset="utf-8" />
    <meta http-equiv="refresh" content="4">


        <head>
            <!-- The Title and Favicon of the Website -->
            <title>Providence</title>
            <link rel="shortcut icon" href="PRCfavicon.ico" type="image/x-icon">


        </head>


        <body>

            <h1 class="ProvidenceTxt">Providence</h1>
            <h1 class="ReformedTxt">Reformed</h1>
            <h1 class="ChurchTxt">Church</h1>
            <h1 class="BoiseTxt">Boise</h1>

        <hr>

        <a href="https://www.youtube.com/channel/UCZAf3EhGuasVIxucTHB9V0A"><img id=YoutubeImg src="https://www.youtube.com/yt/brand/media/image/YouTube-logo-full_color.png" alt="Youtube Channel"> </a>


        <img id=FacebookImg src="https://img.clipartfest.com/c55c67101fd407bcce47c5ed59bf879e_facebook-announces-clickable-facebook-logo_530-300.png" alt="Facebook Page">


        </body>

        <br>

        <iframe class="YoutubeVidBoi" width="560" height="315" src="https://www.youtube.com/embed/bMdIX1mH6r8" frameborder="0" allowfullscreen></iframe>

        <footer>


        </footer>


        </html>

最佳答案

我能看到的唯一问题是您缺少几个分号:

  • div 元素选择器中“width: 100%”后缺少分号。
  • 在 hr 元素选择器中“border-color: #666”后缺少一个分号(我看到 @danjbh 在评论中已经提到了这个分号)。

我看不到任何其他问题,所以希望这会解决它:)

关于html - 我的 CSS/HTML 有一个明显的重大缺陷,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44248545/

相关文章:

jquery - 如何手动控制我的 wordpress 网站上的折叠按钮

css - CSS 中的这种样式来自哪里?

javascript - 如何使水平时间轴 slider 向右

javascript - 如何从本地执行 HTML 和 Javascript *.bat 文件

javascript - 如何通过按下按钮将上标文本添加到 HTML 输入框?

php - 设计回波数据

javascript - 使用 JavaScript 从 HTML 按钮获取值

css - 按相同数量的像素缩放 X 和 Y 中的元素

html - CSS 不影响输入按钮的位置/样式

HTML 为什么这个锁在左边?