我试图将我的后退按钮向上移动,但无论我做什么,它都不起作用。
例如
- 如果我执行
margin-bottom: 29%;
,则Button One
和Button Two
向下移动,而back
按钮保持原样不动。 - 如果我执行
margin-top: 29%;
,则Button One
和Button Two
会随着back 向下移动
按钮。 - 如果我执行
top: 29%
,back
按钮将保持原样,不会移动。
我该如何让我的后退
按钮向上移动?
(如果您需要更多代码或需要我清理一些东西,请告诉我)
.BackButton {
border: 5px solid #401818;
background: #a265d4;
background: -webkit-gradient(linear, left top, left bottom, from(#65d672), to(#a265d4));
background: -webkit-linear-gradient(top, #65d672, #a265d4);
background: -moz-linear-gradient(top, #65d672, #a265d4);
background: -ms-linear-gradient(top, #65d672, #a265d4);
background: -o-linear-gradient(top, #65d672, #a265d4);
background-image: -ms-linear-gradient(top, #65d672 0%, #a265d4 100%);
padding: 12px 8px;
padding-right: 23px 46px;
-webkit-border-radius: 0px;
-moz-border-radius: 0px;
border-radius: 0px;
-webkit-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
-moz-box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
box-shadow: rgba(255,255,255,0.4) 0 1px 0, inset rgba(255,255,255,0.4) 0 1px 0;
text-shadow: #bd7f7f 0 1px 0;
color: #066b6b;
font-size: 24px;
font-family: helvetica, serif;
text-decoration: none;
vertical-align: middle;
}
最佳答案
可以使用位置,例如:
.BackButton {
postition: fixed; //can also use absolute
left: 0;
top: 0;
}
您可以从那里做的足够多了。
关于html - 为什么无论我尝试什么,我的按钮都不会向上移动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52315124/