Please help - new to web design. why wont backgrou

2020-05-09 22:44发布

CSS - This is the css i have written. Im not sure why the background color repeats instead of covering like i said. Sorry if its a dumb mistake, im very new to coding and web design. Thank you in advance for your help :)

body{  background-repeat: no-repeat;
-webkit-background-size: cover;
color-stop(41%,rgba(41,137,216,1)), color-stop(77%,rgba(125,185,232,1))); /* Chrome,Safari4+ */
color:#000000;
font-family:Georgia,Arial,Serif;
font-size: 12px;
}


figure {

float:left;

}
.question {color: blue; font-size: 20px;}
.answer {color: green; font-size: 16px;}

 #taskpic {float:right;}
 #audience {float:left; width: 550px; font-size: 16.5px}
 #back {font-size: 15px;} 
 #main{float:left; color:black; width: 160px; border: 1px solid brown; border-style:double; padding:       2px ; font-size: 18.5px;  }
 #youarehere { color: black;} 
 #name {border: 1px solid blue;


 padding-left: 515px;  }

figure figcaption {

    text-align: center;
}

ul {
  float:right;
  border: 1px solid  blue ;
  width:200px;
 list-style-type:none;
 font-size: 25px;
 font-weight: bold;
}


li a:link {
    color: red;
  }
li a:visited {
    color: red;
  }
li a:focus {
    color: red;
}
li a:hover {
    color: blue;
  }
li a:active {
    color: blue;
}

a:link {
    color: black;
  }
a:visited {
    color: black;
  }
a:focus {
    color: black;
}
a:hover {
    color: red;
  }
  a:active {
    color: red;
}

h2 a:link {
    color: pink;
  }
h2 a:visited {
    color: pink;
  }
h2 a:focus {
    color: pink;
}
h2 a:hover {
    color: red;
  }
h2 a:active {
    color: red; 
}

标签: html css
1条回答
爷的心禁止访问
2楼-- · 2020-05-09 23:09

To quote MDN

The background-size CSS property specifies the size of the background images.

The key word there is images. Size will not apply to color or gradients.

查看更多
登录 后发表回答