我想获取带背景色的Div,并将$graphPhoLink = "https://graph.facebook.com/v2.9/{$albumid}/photos?fields=source,images,name&access_token={$access_token}&limit=500";
左对齐,将#title
左对齐,并将它们都放在一行中。
我无法将它们排成一行!而且我不能给#Header <nav>
。
background-color
/* Reset */
html, body, div, h1, h2, h3, a, p, img, ul, li, footer, fieldset, form, label, header, section {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
.page {
background-color: #fff;
}
#banner {
padding: 8em 0 5em 0;
height: 75vh;
background-image: url(images/banner1.jpg);
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
text-align: center;
position: relative;
}
#semiopacity {
background-color: rgba(20, 15, 10, 0.7);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
a {
margin: 0 0 2em 0;
font-weight: 700;
font-size: 20px;
color: #fff;
text-decoration: none;
font-family: Lato, serif;
}
p {
margin: 0 0 2em 0;
font-weight: 700;
font-size: 20px;
color: #fff;
}
h1,
h2,
h3 {
font-weight: 700;
line-height: 1.5;
margin: 0 0 1em 0;
font-family: Lato, serif;
color: #fff;
}
h1 {
margin-top: 6em;
font-size: 2em;
text-align: center;
}
h2 {
margin-bottom: 2em;
text-align: center;
font-size: 1.5em;
}
#header {
padding: 1em 0 2em 0;
background: #e6e6e6;
}
nav {
margin: 0;
padding: 0;
text-align: right;
}
#title {
font-size: 1.3em;
margin: 1em 1em 0 0;
text-align: left;
margin: 0;
}
#main {
font-size: 1.3em;
margin: 1em 2em 0 0;
}
#lang {
font-size: 1.3em;
margin: 1em 1em 0 0;
}
答案 0 :(得分:0)
我试图修复它:
/* Reset */
html, body, div, h1, h2, h3, a, p, img, ul, li, footer, fieldset, form, label, header, section {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
.page {
background-color: #fff;
}
#banner {
padding: 8em 0 5em 0;
height: 75vh;
background-image: url(images/banner1.jpg);
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
text-align: center;
position: relative;
}
#semiopacity {
background-color: rgba(20, 15, 10, 0.7);
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
a {
margin: 0 0 2em 0;
font-weight: 700;
font-size: 20px;
color: #fff;
text-decoration: none;
font-family: Lato, serif;
}
p {
margin: 0 0 2em 0;
font-weight: 700;
font-size: 20px;
color: #fff;
}
h1,
h2,
h3 {
font-weight: 700;
line-height: 1.5;
margin: 0 0 1em 0;
font-family: Lato, serif;
color: #fff;
}
h1 {
margin-top: 6em;
font-size: 2em;
text-align: center;
}
h2 {
margin-bottom: 2em;
text-align: center;
font-size: 1.5em;
}
#header {
padding: 1em 0 5em 0;
background-color: rgba(20, 15, 10, 0.7);
}
#nav {
margin: 0;
padding: 0;
text-align: right;
float: left;
}
#title {
font-size: 1.3em;
margin: 0;
}
#main {
font-size: 1.3em;
margin: 1em 2em 0 0;
}
#lang {
font-size: 1.3em;
margin: 1em 1em 0 0;
}
#buttons {
font-size: 1.3em;
margin: 1em 1em 0 0;
text-align: left;
margin: 0;
float: left;
}
<title>KAZAKHSTAN — world's large center of travel</title>
<meta charset="utf-8">
<div class="page">
<section id="banner">
<section id="semiopacity">
<div id="Header">
<div id="nav">
<ol>
<tr><a id="title" href="#">KAZAKHSTAN</a></tr>
<tr><a href="#">MAIN</a></tr>
<tr><a href="contact.html">CONTACT</a></tr>
</ol>
</div>
</div>
<h1>KAZAKHSTAN</h1>
<p>KAZAKHSTAN — WORLD'S LARGE CENTER OF TRAVEL.</p>
</section>
</section>
<section id="description">
</section>
</div>