html - CSS 问题 - 标题按钮和宽度

标签 html css web hover

我想将标题按钮(悬停时)和正文宽度设为 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/

最佳答案

DEMO

CSS:

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

margin-left: 更改为 100px

关于html - CSS 问题 - 标题按钮和宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17275579/

相关文章:

html - 2个div之间的空白?

javascript - Firebase 检索用户号到网络

javascript - 什么是对列表重新排序进行动画处理的 react.js 友好方式?

javascript - 如何使用 Croppie(JavaScript 图像裁剪插件)防止过度缩放

javascript - 在 javascript 之上显示 html 按钮

html - 显示大时如何使二维码呈现清晰?

javascript - 如何动态上传并运行javascript文件?

css - 将 div 高度设置为自动时不显示背景颜色!为什么?

html - 如何让两个div并排放置

javascript - 如何使用 node.js 后端服务器与前端和 mongolab 数据库进行交互?