从wwwroot加载时缺少CSS部分

时间:2015-02-06 12:31:19

标签: html css web

我将我的网站的工作版本发布到我的wwwroot文件夹,但是当我打开网站时,一些设计遗失了。 我查看了chrome中的devTools(来源)并注意到我的css中有部分缺失,当我从wwwroot文件夹中手动打开css时,我看到这些部分是实际存在的。 什么可能导致选择性的CSS负载? 我的css文件中缺少的部分:

#layer {
    background: url(http://s14.directupload.net/images/111129/44ga9qid.png);
    height: 550px;
    background-repeat: repeat;
    position: absolute;
    z-index: 3;
    width: 100%;
    top: 0;
    left: 0;
}

#slide {
    position: relative;
    z-index: 1;
}

.menufixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    border-bottom: chocolate 8px solid;
    background-color: rgb(0, 0, 0);
    box-shadow: 0 0 10px black;
}

发布到wwwroot文件夹的整个css文件:

.menu_item {
    color: #FFFFFF;
    border-top: 4px solid #B6B5B5;
    display: inline-block;
    font-family: Arial;
    font-variant: small-caps;
    font-weight: normal;
    padding: 5px 2px 0px 2px;
    text-decoration: none;
    /* font-weight: bold; */
    letter-spacing: 2px;
    margin: 5px;
}

#Top {
    border-bottom: chocolate 8px solid;
    /* margin-bottom: 3%; */
    background-color: rgb(0, 0, 0);
    box-shadow: 0 0 10px black;
}

a {
    text-decoration: none;
    color: #5E5E5E;
}

#Logo {
    color: #5E5E5E;
    font-family: 'Reenie Beanie', cursive;
    display: inline-block;
    margin-right: 3vw;
    background: url(http://www.elinorart.com/Gallery/latest%20artworks/slides/93.jpg) no-repeat, #5E5E5E;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 70px;
    margin: 5% 0;
}


h1:hover {
    color: chocolate;
}

a:hover, a div:hover {
    color: chocolate;
}

#menu_bar {
    display: inline-block;
}

#contact_text {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 10px;
    /* font-weight: 600; */
    font-size: 16px;
    /* font-family: -webkit-pictograph; */
    color: #5E5E5E;
    /* letter-spacing: 0px; */
}

#bottom_left p {
    padding: 0px 49px 0 64px;
}

#bottom_center p {
    padding: 0px 62px 0 30px;
}

#contact_details {
    padding-bottom: 10px;
    color: #5E5E5E;
    font-size: 16px;
}

#pageFooter {
    font-size: 0.8em;
    color: #5E5E5E;
    text-align: center;
    font-family: Arial;
    margin-top: 10%;
}

li {
    line-height: 24px;
    font-family: Arial;
    color: #1C1C1C;
    font-size: 16px;
    list-style-type: none;
}

.exhibit_name {
    color: black;
}

#page {
    text-align: center;
    background-color: rgb(232, 232, 232);
}

.page_content {
    font-family: Arial;
    /*text-align: initial;*/
    /* background-color: rgb(232, 232, 232); */
    /* padding-top: 3%; */
}

p {
    font-size: 16px;
    font-family: Arial;
}

@media screen and (max-width: 768px) {
    body {
        background-color: lightblue;
    }
}

body.about_me {
    background-color: green;
}

.borderClass {
    border-color: chocolate;
}

#contactDiv {
    display: inline-block;
}

td {
    vertical-align: top;
}

.contact_field {
    border-bottom-width: 1px;
    border: 1px solid #5E5E5E;
    border-radius: 4px;
    font-size: 16px;
    font-family: Arial, cursive;
    width: 322px;
    height: 24px;
}

.contact_field_desc {
    font-size: 14px;
    padding: 4px;
    font-family: Arial;
    text-align: left;
}

.send_form {
    border-bottom-width: 1px;
    border: 1px solid #5E5E5E;
    border-radius: 4px;
    padding: 5px 28px;
}

body {
    margin: auto;
}

#Facebook {
    /* width: 100%; */
    /* text-align: center; */
    /* margin-left: 40%; */
    /* margin-top: 3%; */
    display: inline-flex;
    margin-top: 2%;
}

#fb-root {
    /*float: left;*/
    vertical-align: central;
    margin-right: 10px;
}

#fb-root2 {
    /*float: right;*/
    vertical-align: central;
    margin-left: 10px;
}

.fb_iframe_widget {
    /* margin-right: 13px; */
    /* float: left; */
    padding-right: 10%;
}

.exhibitions {
    width: 40%;
    margin: 0 5%;
    float: left;
    /*text-align: left;*/
}

.wrapper {
    display: inline-block;
    width: 45%;
    text-align: left;
}

.exhibitions_wrapper {
    padding-right: 3%;
}

ul {
    padding: 0px;
}

    ul li ul li {
        list-style-type: initial;
        padding-bottom: 10px;
    }

.exhibitions_year {
    /* margin-left: -5%; */
    font-family: 'Reenie Beanie', cursive;
    font-size: 37px;
    /* line-height: 1px; */
    margin: 14px 0;
    color: orange;
    color: chocolate;
    font-weight: 500;
    letter-spacing: 4px;
}

.bottom_sections {
    width: 25%;
    /* height: 100%; */
    vertical-align: top;
    text-align: left;
    display: inline-block;
    /* padding: 2%; */
}

.bottom_content {
    /* padding: 0 10%; */
    text-align: center;
}

.buttom_text {
    font-size: 13px;
    line-height: 25px;
    padding: 0 10%;
    text-align: left;
}

#AboutMe p {
    font-size: 13px;
    line-height: 25px;
}

.contact_info {
    display: inline-block;
    width: 19%;
    vertical-align: top;
    padding-left: 30px;
}

#exhibitions_wrapper {
    width: 70%;
}

#AboutMe .wrapper {
    border-right: 1px solid lightgray;
    padding-right: 30px;
}

h3 {
    padding-top: 3%;
    margin: 12px 0;
    font-variant: small-caps;
    font-size: 37px;
    font-weight: normal;
    color: dimgrey;
    letter-spacing: 10px;
    font-family: Arial;
}

h4 {
    font-size: 24px;
    color: dimgrey;
    font-variant: small-caps;
    font-weight: normal;
}

h5 {
    margin-top: 30px;
    /* padding: 15px; */
    border-bottom: 1px solid black;
    font-size: 24px;
    color: dimgrey;
    font-variant: small-caps;
    font-weight: normal;
    text-align: center;
}

h2 {
    /* padding: 0; */
    margin-top: 12px;
    font-variant: small-caps;
    font-size: 32px;
    font-weight: normal;
    color: dimgrey;
    letter-spacing: 10px;
    font-family: Arial;
}

#AboutMe .contact_field {
    width: 187px;
}

input {
    margin-bottom: 15px;
}

.gallery_homepage {
    height: 550px;
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
}

.gallery_homepage div {
    height: 550px;
}

#layer {
    background: url(http://s14.directupload.net/images/111129/44ga9qid.png);
    height: 550px;
    background-repeat: repeat;
    position: absolute;
    z-index: 3;
    width: 100%;
    top: 0;
    left: 0;
}

#slide {
    position: relative;
    z-index: 1;
}

.menufixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    border-bottom: chocolate 8px solid;
    background-color: rgb(0, 0, 0);
    box-shadow: 0 0 10px black;
}

谢谢!

1 个答案:

答案 0 :(得分:0)

可能有很多原因:

  1. 您的CSS规则可能会被内联样式覆盖
  2. 它可能会被同一CSS文件中的其他先前规则(在后面的行中)覆盖
  3. 你可能会使用'来消除css。 !重要的' (这可以在开发工具中看到)
  4. 您的CSS文件可能有错误,例如语法错误或缺少&#39 ;;'在经过规则或失踪之后{'或者'}'}在规则的开始或结束块
  5. 最后但并非最不重要的一点,您可能没有在html
  6. 中正确包含(正确的)CSS文件

    希望这有帮助。