0

我的标题按钮(悬停时)和我想要 100% 的正文宽度有问题。请帮忙。谢谢你。

这是css,你可以在jsfiddle中看到html。

    body {
  background-color:rgba(0, 0, 0, 0.1);
  font-family: "Alef Hebrew",
           “Helvetica Neue”,
           Helvetica,
           Arial,
           sans-serif;
}
#header {
left: 0;
top: 0px;
width: 100%;
height: 64px;
background: #007ac1;
position: fixed;
}
    #header ul {
    margin-left: 200px !important;
    }
#x {
border-left: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 0px -1px 0px 1px rgba(255, 255, 255, 0.11);
text-decoration: underline;
}
.btn {
margin-left: -2px;
border-right: 1px solid rgba(0, 0, 0, 0.1);
box-shadow: 1px 0 0 rgba(255, 255, 255, 0.11);
color: white;
display: inline;
text-decoration: none;
padding: 25px;
transition: 0.5s;
font-weight:bold;
}
.btn:hover {
background: rgba(255,255,255,1);
color: #000;
}
#body {
padding: 100px;
width: 100%;
background: #fff;
float:left; 
}

http://jsfiddle.net/EuR8s/

4

1 回答 1

0

演示

CSS:

#header ul {
        margin-left: 100px !important;
        }

更改margin-left:100px

于 2013-06-24T12:48:36.810 回答