简体   繁体   English

样式表突破网站

[英]Stylesheet breaking website

UPDATED The white bar is still there, however, the white bar is smaller and so is the image (the image is within the white bar) and the white bar stretches across the whole page. 更新白条仍然存在,但是,白条较小,图像也是如此(图像在白条内),并且白条延伸到整个页面。 The white bar is above the particles.js and its background. 白色栏位于particles.js及其背景上方。

HTML: HTML:

<!DOCTYPE html>
<html>
<head>
    <link href='css/style.css' rel='stylesheet' type="text/css">
    <title></title>
</head>
<body>
    <div id="wrapper">
        <center>
            <img class='' src='img/kaylumlogo.png'></img>
        </center>
    </div>
    <div id="particles-js"></div>
    <script src="http://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js">
    </script> 
    <script src="js/index.js">
    </script>
</body>
</html>

CSS: CSS:

/* ---- reset ---- */

body {
    margin: 0;
    font: normal 75% Arial, Helvetica, sans-serif;
}
canvas {
    display: block;
    vertical-align: bottom;
}

/* ---- particles.js container ---- */

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #b61924;
    background-image: url("http://i.imgur.com/5F64MpH.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
}
#wrapper {
    border: 0;
    width: 200px;
}
img {
    width: 200px;
}

Some of your tags are not close, some are closed incorrectly. 您的某些标签未关闭,某些标签未正确关闭。

We always close a link tag within the tag with "/" 我们始终使用“ /”关闭标签中的链接标签

<link ... />

Same with images 与图像相同

<img ... /> instead of <img ... ></img>

I think "< center >" is deprecated. 我认为“ <center>”已弃用。 With good semantic everything is possible. 有了良好的语义,一切皆有可能。

It might solve your issue 它可能会解决您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM