我是 html 新手,还在学习。我试图在中心(div)中保留一个按钮,但我真的不知道该怎么做。我用边距来放置它。- 当窗口全屏时效果很好,但是当我把窗口变小时,按钮会改变位置。
[对不起,如果英语不完美xD]
这是按钮(CSS)的代码:
.signupbutton {
position:relative;
margin-left: 880px;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0d8f64), color-stop(1, #0d8f64));
background:-moz-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-webkit-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-o-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-ms-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:linear-gradient(to bottom, #0d8f64 5%, #0d8f64 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0d8f64', endColorstr='#0d8f64',GradientType=0);
background-color:#0d8f64;
-moz-border-radius:14px;
-webkit-border-radius:14px;
border-radius:14px;
border:2px solid #424745;
display:inline-block;
color:#ffffff;
font-family:arial;
font-size: 16px;
font-weight:bold;
padding:12px 42px;
text-decoration:none;
text-shadow:0px -1px 0px #5b6178;
}
.signupbutton:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0d8f64), color-stop(1, #0d8f64));
background:-moz-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-webkit-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-o-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:-ms-linear-gradient(top, #0d8f64 5%, #0d8f64 100%);
background:linear-gradient(to bottom, #0d8f64 5%, #0d8f64 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0d8f64', endColorstr='#0d8f64',GradientType=0);
background-color:#0d8f64;
}
.signupbutton:active {
position:relative;
top:1px;
}