* { margin: 0; border: 0; padding: 0; } html { -webkit-text-size-adjust: none; } body { background: #474747 url(bg.png); } h1 a { display: block; text-decoration: none; font: 40px Helvetica, Arial, Sans-Serif; letter-spacing: -5px; text-align: center; color: #a0a0a0; text-shadow: 0px 5px 8px #2a2a2a; } h2 { font: 30px Tahoma, Helvetica, Arial, Sans-Serif; text-align: center; color: #222; text-shadow: 0px 2px 3px #555; } div#mobile pre { width: 275px; margin: 0 auto; background: #222; padding: 10px; font-size: 20px; color: #555; text-shadow: 0px 2px 3px #171717; -webkit-box-shadow: 0px 2px 3px #555; -webkit-border-radius: 20px; }
这是我目前在 iPhone 优化版网站上的内容。但从 iPhone/iPod touch 上看,它看起来还不错,只是右边有多余的空间。我该如何解决这个问题?
最佳答案
我认为您的“标签”后有一些制表符或空格。您还应该在标签元素中包含文本。
你可能拥有的东西:
<pre> <form method="post" action="/index.php">Enter a URL<br />(WITH THE http://): <br /><input type="text" name="url">
<br />Want a custom tag? <br /><input type="text" name="custom">
</form>
No URL was entered.</pre>
你应该拥有的:
<form method="post" action="/index.php">
<label for="url">
Enter a URL (WITH THE http://):
</label>
<input type="text" name="url">
<label for="custom">
Want a custom tag?
</label>
<input type="text" name="custom">
</form>
<p>No URL was entered.</p>
然后您需要对其进行样式设置,使其看起来像以前一样。请记住前置元素通常用于输出代码。
关于iphone - 右侧多余空间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6104754/