gpt4 book ai didi

iphone - 按钮文本未对齐 Safari

转载 作者:行者123 更新时间:2023-12-03 21:14:45 25 4
gpt4 key购买 nike

谁能告诉我为什么这段文字不居中?我发誓上传和下载按钮是相同的,订阅按钮也做了同样的事情……iPhone 是不是很奇怪,我必须补偿不一致性?谢谢

抱歉张贴了文字墙,我想知道如何才能破译这个问题。

Safari ViewHTML

<html>

<head>
<title>Community Sound</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="mobile_style.css">
</head>


<body>
<!-- Headers -->
<div class="container">
<div class="no-result vertical-align-outer">
<div class="vertical-align">
<h1 class="header">Sample pack Generator</h1>
<p class="subheader">Having a creative block?</p>
</div>
</div>
</div>

<div class=" vertical-align-outer">
<div class="vertical-align">
<div class='center margin_bottom'>
<button class='text-white button'>Upload</button>
<button class='text-white button'>Download</button>
</div>
</div>
</div>

<div class="no-result vertical-align-outer">
<div class="vertical-align">
<form action="phEmail.php" method="POST">
<!-- EMAIL -->
<div>
<label for="email"></label>
<input type="email" class="email glowing-border" name="email" placeholder="Enter your email">
</div>
<button type="submit" class="emailbtn">Subscribe</button>
<span></span>
<!-- errors will go here -->
<br>
<br>
<div id="sub_result">
</div>
</div>
</div>

<footer>
<p>
<a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&SESSION=5NenPKc4q2177ZpoquvHh8okRxZWSeSNw4aedlweOg4OZeMMN3bW78JCXEO&dispatch=5885d80a13c0db1f8e263663d3faee8d64ad11bbf4d2a5a1a0d303a50933f9b2" target="_blank" STYLE="text-decoration:none; color: #ffc439;"
class="text-white"> &nbsp; Donate</a> &nbsp;| &nbsp;
<a href="about.html" STYLE="text-decoration:none" class="text-white">About</a> &nbsp;| &nbsp;
<a href="terms.html" STYLE="text-decoration:none" class="text-white">Terms</a>&nbsp; | &nbsp;
<a href="contact.html" target="_blank" STYLE="text-decoration:none" class="text-white"> Contact</a> &nbsp;
</p>
</footer>

</body>
</html>

CSS

@import url(http://netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css);

body {
background: url(http://i.imgur.com/hyC6F3D.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
margin: 0 auto;
width: 100%;
padding: 0px;
font-family: "gill sans";
color: #ffffff;
font-weight: 300;
}

.header {
font-size: 30px;
color: #ffffff;
font-style: normal;
font-variant: normal;
font-weight: 100;
}

.subheader {
font-size: 15px;
color: #ffffff;
font-style: normal;
font-variant: normal;
font-weight: 100;
}

.container {
width: 100%;
height: 100px;
margin-top:5%;
}

.no-result {
text-align: center;
background-color: rgba(0, 0, 0, 0.0);
color: #fff;

}

.vertical-align-outer {
display: table;
width: 100%;
}

.vertical-align {
display: table-cell;
vertical-align: middle;
}

footer {
width:100%;
height:50px;
position:fixed;
bottom:0;
left:0;
text-align:center;
}

.text-white {
font-family: "gill sans";
color: white;
font-style: normal;
font-variant: normal;
font-weight: 100;
}

.button{
color:white;
height:100px;
width:100px;
margin:5%;
background-color: rgba(0, 0, 0, 0.4);
border-color:rgba(255,255, 255, 1);
border: 2px solid #fff;
font-size: 20px;
outline: 0;
-webkit-transition: 100ms linear 0s;
-moz-transition: 100ms linear 0s;
-o-transition: 100ms linear 0s;
transition: 100ms linear 0s;
text-align: center;
padding-left: auto;
padding-right: auto;
}

.button:active {
background-color: rgba(255, 255, 255, .50);
-webkit-transform: scale(1.2);
}

.button:target {
background-color: rgba(255, 255, 255, .20);
-webkit-transform: scale(100%);
}

.center{
text-align: center;
}
.margin_bottom{
margin:20px;
}





.email {
height: 30px;
width: 70%;
font-size: 20px;
font-style: normal;
font-variant: normal;
font-weight: 100;
line-height: 30px;
color: #cacaca;
background-color: rgba(255, 255, 255, 0);
margin:2%;
}

.glowing-border {
border: 2px solid #dadada;
border-radius: 7px;
}

.glowing-border:focus {
background-color: rgba(255, 255, 255, .8);
color: black;
outline: none;
border-color: #ffffff;
box-shadow: 0 0 100px #ffffff;
}



.emailbtn {
height: 35px;
width: 120px;
font-size: 20px;
font-style: normal;
font-variant: normal;
font-weight: 100;
margin: 5%;
color: #cacaca;
background-color: rgba(255, 255, 255, 0);
border: 2px solid #dadada;
border-radius: 7px;
outline: 0;
text-align: center;
padding-left: auto;
padding-right: auto;
}

.emailbtn:active {
background-color: rgba(255, 255, 255, .50);
-webkit-transform: scale(1.2);
border-color: #ffffff;
box-shadow: 0 0 30px #ffffff;
}

.emailbtn:target {
background-color: rgba(255, 255, 255, .20);
-webkit-transform: scale(1.2);
}

最佳答案

帖子现在已经有 2 岁了,但无论如何:

padding不能设置为auto — 它不是有效的 CSS — 因此按钮可能在其他地方设置了填充或正在使用浏览器的默认填充。

我猜测填充将“下载”文本推到右侧,并且按钮的宽度不足以容纳填充和文本。

您可以设置padding-left: 0; padding-right: 0相反。

如果没有看到开发工具,我无法准确判断,所以这是最好的猜测。

关于iphone - 按钮文本未对齐 Safari,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34536794/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com