iPad上的CSS问题与表边框 [英] CSS issue on iPad with table border

查看:176
本文介绍了iPad上的CSS问题与表边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在iPad上呈现html页面时,我有一个CSS问题。一切工作在其他浏览器。问题是,我在表格中的单元格之间获得一个小空间,如图所示: http ://oi53.tinypic.com/2vl0as9.jpg

I have a CSS problem when the html page is rendered on iPad. Everything works good in other browsers. The problem is that I get a small space between the cells in my tables as you can see in the picture: http://oi53.tinypic.com/2vl0as9.jpg

如果我在单元格之间的行上放大页面最大值,它会消失..所以它在渲染页面时必须是某种错误。我可以用某种方式解决这个问题吗?这是我的表格和CSS:

If I zoom in the page maximum on the line between the cells, it dissappears.. So it must be some kind of bug when the page is rendered. Can I go around this in some way? This is my table and CSS:

<table class="smallTable" cellpadding=0 cellspacing=0>
    <tr>
        <td class="td1"></td>
        <td class="td2"></td>
    </tr>
    <tr>
        <td class="td1"></td>
        <td class="td2"></td>
    </tr>
</table>

CSS:

.smallTable 
{
    margin: 20px auto 40px auto;
    border-spacing: 0;
}

.smallTable td
{
    margin: 0;
}

.smallTable td.td1 
{
    background: url(../images/table1.png);
}

.smallTable td.td2 
{
    background: url(../images/table2.png);
}


推荐答案

这个错误半天,当试图做一个HTML格式的电子邮件。

I just bashed my head against this bug for half a day while trying to make an HTML formatted email.

当以非1:1的比例查看表时,iPad有一个错误(喘气!)。如果你的表的TD标签有一个深色的背景,而TABLE的父类有一个浅的颜色,这一点尤其明显。 Rowspans和colspans放大了这个问题。

iPad's have a bug (gasp!) when viewing tables at a non 1:1 scale. This is especially apparent if your table's TD tags have a dark background and the TABLE's parent has a light color. Rowspans and colspans amplify the problem.

我最初认为问题是iPad引入了一个边框。

真正的问题是苹果的程序员没有决定是否将在缩放时向上或向下均匀地舍入像素的分数。

I initially thought the problem was that iPad was introducing a border.
The real problem is that the coders at Apple didn't decide if they were going to uniformly round fractions of a pixel up, or down while scaling.

因此,一些TD标签在未按100%缩放时显示为边框。当在现实中它只是光背景显示通过。

Hence, some TD tags appear to have a border when not at 100% scale. When in reality it is just the light background showing through.

解决方案将表格包装到具有相同深色背景的另一个表格中。

The solution is to wrap the table into another table that has the same dark background.

欢迎来到1998年的网页设计。我听到mp3.com是所有的愤怒。我买了一些邮购狗宠物从pets.com。

Welcome to 1998 web-design. I hear mp3.com is all the rage. Gonna buy me some mail-order dog treats from pets.com.

感谢iPad。

这篇关于iPad上的CSS问题与表边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆