图像没有拿起CSS类

时间:2017-03-15 22:15:04

标签: html css

我已将我的HTML / CSS文件保存在桌面上(所有工作都按预期工作)。当我上传到主机(站点地面)时,我的CSS规则似乎不起作用。

班级MyClass.cpp应该是我的一张图片" images / painting8.jpg"但它似乎不起作用(图像以完整大小显示,当我查看源代码时,不会拾取类。

我出错的任何想法?



painting4

/************** Navigation Styles **************/

nav li {
  list-style: none;
  display: inline;
  padding: 10px 30px;
  border-right: solid 1px rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  margin: 0 auto;
  font-size: 1.3em;
}

nav img {
  display: inline;
  float: left;
  padding: 6px;
  margin-left: 16px;
  margin-top: 6px;
  Margin-bottom: 6px;
}

* {
  font-family: arial;
}

.logo {
  width: 40px;
}

nav ul {
  padding: 0;
}

.last_of_nav {
  border-right: none;
  padding-right: none;
  margin-right: 70px;
}

#nav {
  text-align: center;
  background-color: black;
}

#wrapper a:hover {
  background-color: CadetBlue;
  width: 100%;
}


/********************** Element Selectors ************************/

body {
  margin: 0;
  background-color: white;
}

nav {
  background-color: #4682b4;
  padding: 1px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

nav ul li a {
  padding: 15px 45px;
  width: 100%;
}

a {
  text-decoration: none;
}

#graduation-logo {
  width: 40px;
  height: 40px;
  margin-left: 10px;
  padding: 0;
  margin-top: 5px;
}

.year {
  color: CadetBlue;
}


/******** pseudo selectors *********/

nav a:visited {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
}

nav li a:hover {
  color: white;
}

nav li a:active {
  color: white;
  background-color: CadetBlue;
}

nav a:link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.5);
}

* {
  box-sizing: border-box;
}

nav img:hover {
  background-color: CadetBlue;
}

nav li a:hover,
a.selected {
  color: white !important;
  background-color: CadetBlue;
}


/****** Home Page ******/

.profile_picture {
  border-radius: 40%;
  float: ;
  margin-left: 35%;
  margin-right: 35%;
  margin-bottom: 5%;
  width: 30%
}

.secondary-cv-content-wrapper div {
  display: inline;
}


/****** Main body ******/

.main-content {
  background-color: white;
  width: 50%;
  margin-left: 10%;
  margin-right: 0;
  float: left;
}

.main-content-home {
  width: 50%;
  margin-left: 25%;
  margin-right: 25%;
}

.main-content-wrapper-home {
  background-color: rgba(211, 211, 211, 0.4);
  height: auto;
  width: 100%;
  padding-bottom: 30px;
}

.intro {
  width: 90%;
  text-align: justify;
  margin: 1px auto;
  line-height: 30px;
  font-size: 1em;
}

.main-content-wrapper h1 {
  font-family: arial;
  padding: 5px;
}

.main-content-wrapper {
  background-color: rgba(211, 211, 211, 0.4);
  height: auto;
  width: 100%;
  padding-bottom: 30px;
  margin-bottom: 40px;
}

.main-content-wrapper h1,
.main-content-wrapper-home h1 {
  font-size: 40px;
  text-align: center;
  margin-top: 35px;
  padding-top: 10px;
}

.contact {
  text-align: center;
}

.contact_list {
  list-style: none;
  margin: 10px 10px;
  padding: 0;
  text-align: center;
}

.main-cv-content h4 {
  text-align: center;
}

.secondary-cv-content {
  width: 25%;
  margin-right: 10%;
  margin-left: 5%;
  float: right;
  margin-top: 35px;
}

.secondary-cv-content-wrapper {
  padding: 10px;
  background-color: white;
  padding-left: 30px;
  border: solid 2px rgba(211, 211, 211, 0.7);
}

.secondary-cv-content-wrapper h2,
.third-content-wrapper h2,
.fourth-content-wrapper h2,
.year,
h1,
.portfolio-first-content h2,
.painting2box h2 {
  color: #4682b4;
  text-align: center;
}

.secondary-cv-content-wrapper ul {}

.third-content {
  float: right;
  width: 25%;
  margin-right: 10%;
  margin-top: 35px;
}

.third-content-wrapper {
  border: solid 2px rgba(211, 211, 211, 0.7);
  padding: 10px 30px;
}

.third-content-wrapper a {
  display: inline;
}

.third-content-wrapper img {
  margin: 0px 0px;
  width: 50%;
  float: left;
  height: 140px;
  display: inline;
}

.third-content-wrapper h1 {
  margin: 0px 0px;
  width: 50%;
  float: left;
  height: 140px;
}

.fourth-content-wrapper {
  border: solid 2px rgba(211, 211, 211, 0.7);
  padding: 10px 30px;
  padding-bottom: 30px;
  text-align: center;
}

.fourth-content {
  float: right;
  width: 25%;
  margin-right: 10%;
  margin-top: 35px;
}

.secondary-cv-content-wrapper p {
  background-color: grey;
}

.portfolio-first-content {
  width: 60%;
  margin: 30px 20%;
}

.portfolio-first-content #main-painting2 {
  width: 100%;
  margin-bottom: 10px 10%;
}

.second-row-images img {
  width: 50%;
  float: left;
  margin: 10px 0;
  height: 430px;
}

#main-painting3 {
  width: 50%;
  float: left;
}

.main-painting4 {
  width: 50%;
  float: left;
}


/***** line Height ******/

p {
  line-height: 140%;
}

.painting2box {
  width: 15%;
  margin: 0 2.5%;
  display: inline-block;
}


/* Main footer */

.main-footer {
  border-top: solid 2px rgba(211, 211, 211, 0.7);
  margin-top: 50px;
  background-color: none;
  text-align: center;
  padding: 3px;
  clear: both;
  font-size: 1em;
  width: 100%;
  margin-top: 100px;
  position: relative;
}

.main-cv-content {
  padding: 15px;
  line-height: 140%;
}

.secondary-content {}


/****** Media Queries *****/

@media (max-width:950px) {
  .profile_picture {
    width: 50%;
    float: none;
    position: center
  }
  .main-content img {
    margin: 10px 25%;
  }
}

@media (max-width:500px) {
  .profile_picture {
    width: 60%;
    float: none;
    box-sizing: border-box;
  }
  .main-content {
    padding: 10%
  }
  .main-content {
    width: 80%;
  }
}




0 个答案:

没有答案