Closed. This question is off-topic. It is not currently accepting answers. Learn more。
想改进这个问题吗?Update the question所以堆栈溢出的值小于aa>。
两年前关闭。
我想在标题上加一个按钮,但它没有显示出来,我想它在div下面。为什么?我试图改变绝对位置,但没什么用。
.large-header {
position: relative;
width: 100%;
background: #333;
overflow: hidden;
background-size: cover;
background-position: center center;
z-index: 1;
}
.demo-1 .large-header {
background-image: url('../img/demo-1-bg.jpg');
}
.main-title {
position: absolute;
margin: 0;
padding: 0;
color: #f9f1e9;
text-align: center;
top: 50%;
left: 50%;
-webkit-transform: translate3d(-50%,-50%,0);
transform: translate3d(-50%,-50%,0);
}
.homebtn {
position:absolute;
-webkit-border-radius: 4;
-moz-border-radius: 4;
border-radius: 4px;
font-family: Arial;
color: #ffffff;
font-size: 41px;
background: #f0712c;
padding: 10px 20px 10px 20px;
text-decoration: none;
}
.homebtn:hover {
background: #f25e0e;
text-decoration: none;
}
最佳答案
您定义了一个样式,但它是一个类。
代替
通过