我正在学校为我的班级制作一个页面,我的页面中有三个当前活动的div。标题div工作正常,但我的mainContent和导航ID似乎忽略了我希望bg颜色为橙色的事实。任何帮助将不胜感激!
HTML:
<html><head><title>GUMI MEGPOID | Home</title></head>
<body>
<div id="header"><h1>GUMI MEGPOID</h1></div>
<div id="navigation">
<p><a href="{text:Link one url}">Home</a>
<a href="{text:Link two url}">Albums</a>
<a href="{text:Link three url}">Lyrics</a>
<a href="{text:Link four url}">Tours</a>
</p></div>
<div id=”mainContent”><p>blah blah blah.<p></div>
</body></html>
CSS:
h1 {color: #eeee99; font-size: 3 em; text-align: center; }
h2 {color: #eeee99; line-height: 130%; font-size: 1.75 em; font-family: 宋体; }
h3 {color: #eeee99; line-height: 130%; font-size: 1.625 em; }
p {color: #eeee99; line-height: 130%; font-size: .9em; margin-left: 10%; margin-right: 10%; }
p1 {color: #eeee99; line-height: 130%; font-size: .75em; }
body { background-color: #eeee99; }
#header { width: 650px; height: 100px; line-height: 100px; background: rgb(238, 119, 34); margin-bottom: 10%; text-align: center; align: right; }
#mainContent { width: 780px; height: 500px; background: rgb(238, 119, 34); /* Fallback */ background: rgba(238, 119, 34, .6); text-align: center; }
#navigation { width: 200px; height: 100px; top: auto; margin-left: 160px; position: fixed; margin-top: 10px; -webkit-transition: all 0.6s ease-in-out; -moz-transition: all 0.6s ease-in-out; -o-transition: all 0.6s ease-in-out; }
#navigation a { font-size: 11px; line-height: 20px; display: inline-block; margin-top: 5px; width: 100px; text-align: center; color: #eeee99; background-color: {color: #ee7722}; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; }
#navigation a:hover { color: #eeee99; background-color: {color: #ee7722}; opacity: 0.5; -webkit-transition: all 0.5s ease-in-out; -moz-transition: all 0.5s ease-in-out; -o-transition: all 0.5s ease-in-out; transition: all 0.5s ease-in-out; }</style>
答案 0 :(得分:3)
此行中的双引号
<div id=”mainContent”><p>blah blah blah.<p></div>
应该直接(“)而不是卷曲(”)引号。
答案 1 :(得分:0)
#navigation a上的background-color标签错误。尝试与身体相同:
background-color: #ee7722;