我的网页内容太小,我遇到了问题。我已经弄乱了每个选择器,但似乎无法使我的内容正常显示。我希望我的页面可以在大多数设备和浏览器上访问。我的CSS:
body, h1, h2, h3, p, header, {
margin: 0;
padding: 0;
border: 0;
}
body {
background: #efeff3;
font-family: 'Roboto', sans-serif;
-webkit-font-smoothing: antialiased;
}
.wrapper {
position: relative;
clear:both;
margin: auto auto;
overflow: hidden;
background-image: url("img/cube.png");
}
img {
max-width: 100%;
}
header {
background-color: #fff;
height: 200px;
padding: 20px 0 0 0;
background-image: url("img/cube.png");
}
h1 {
margin: 10px 0 0;
font-size: 100px;
}
.title {
text-align: center;
color: tomato;
font-family: 'Bitter', serif;
}
.nav {
text-align: center;
}
.nav ul {
list-style: none;
padding: 0 5px 0;
}
.nav li {
display: inline-block;
margin: 20px 10px 0 10px;
padding: 0 10px 15px 10px;
font-size: 28px;
font-family: 'Bitter', serif;
}
.main-content{
margin: 80px 0 0 0;
}
.blog {
background: #fff;
padding:50px;
width: 600px;
margin: 50px auto 0;
border: 5px ridge;
}
.blog h2 {
font-size:21px;
font-weight:500;
}
.blog h2 a {
color:#CC0000;
text-decoration:none;
}
.blog .date {
color:#9e9e9e;
margin-top:10px;
font-size:14px;
}
.blog .text {
color:#212121;
margin-top:20px;
font-size:15px;
line-height:22px;
}
a {
text-decoration: none;
color: #fff;
}
a:hover {
color: tomato;
}
p#copyright {
margin-left: auto;
margin-right: auto;
}
img.mediaicon {
width: 32px;
height: 32px;
display: inline-block;
}
.footer {
text-align: center;
padding: 20px auto 20px;
background-image: url("img/cube.png");
}
答案 0 :(得分:1)
也许我错了,但是读你的CSS,你的间距是无效的。您无法将数字与度量分开,例如:
20 px
必须:
20px