- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我一直在努力理解this excerpt来自 CSS 2.2 规范的一段时间没有成功(大胆的选择是我的):
UAs must compute an initial left and right border width for the table by examining the first and last cells in the first row of the table. The left border width of the table is half of the first cell's collapsed left border, and the right border width of the table is half of the last cell's collapsed right border. If subsequent rows have larger collapsed left and right borders, then any excess spills into the margin area of the table.
The top border width of the table is computed by examining all cells who collapse their top borders with the top border of the table. The top border width of the table is equal to half of the maximum collapsed top border.
这就是边框、折叠等在 Chrome 中的实现方式(FF 和 IE > 7 相同):
table {
border: 6px solid green;
border-spacing: 0;
border-collapse: collapse;
}
#cell_1_1 {
border: 28px solid red;
}
#cell_2_1 {
border: 12px solid chartreuse;
}
#cell_2_2 {
border: 2px solid cyan;
}
当我期待这样的事情时:
我希望表格的左边框厚度为 14 像素。因为第一个单元格 #cell_1_1
的折叠左边框是 28px 宽(表格的左边框宽度是第一个单元格折叠左边框的一半)并且在左边边框在单元格和表格之间分开。所以从视觉上看,表格在第一个单元格附近有 28 px 的边框,但是 14 px 属于第一个单元格的边框。然后表格左侧的边框保持不变。如果某些单元格的边框较宽,则它们会向左突出,而不会影响表格的左边框。
与上边框相同。
我还认为问题可能与摘录中的initial 字有关,即这些规则仅适用于表格没有指定边框的情况,但事实证明这无关(删除表格的边框样式规则只是简单地删除了绿色边框)。
那么任何人都可以回答下一个问题:
这个折叠边框模型在 Chrome、FF、IE 中的实现是否正确?
如果它们是正确的,我对规范的理解有什么问题?
现在,如果我们反之亦然,假设 Chrome 中的实现作为推导规范的起点,那么这部分应该类似于下一部分(我只保留了与简洁的左边框):
UAs must compute an initial left and right border width for the table which is then used to position the table relatively to its containing block by examining the first and last cells in the first row of the table. The left border width of the table is half of the first cell's collapsed left border after all border conflicts if any have been resolved
...
If subsequent rows have larger collapsed left and right borders, then any excess spills into the margin area of the table.
...
Any borders that spill into the margin are taken into account when determining if the table overflows some ancestor (see 'overflow'), but do not affect the position of the table relatively to its containing block
那么摘录就有意义了。
这里有一个表格,其边框比粉红色背景的包含 block 内的第一个单元格的边框宽(正如我们所见,表格的边框选择在第一个单元格的边框之上,因为它更宽且然后此边框用于将表格定位在容器内。后续单元格的较宽边框突出到表格边框之外):
这里有同一个表格,其第一个单元格的边框比表格的边框宽,这是在边界冲突解决期间选择的。此处此边框用于相对于容器定位表格:
最佳答案
答案是否定的。我喜欢 CSSWG 进行的坦率讨论,以及关于 current draft of the CSS Tables 3 editors' draft 的注释告诉你关于这个问题你需要知道的一切。
Since browsers handle this so differently, convergence cannot happen without reimplementation. …
… some combinations are not well-posed problems, so no rendering algorithm could be optimal.
Because they grew from something simple (HTML) to something very complex (HTML+CSS), the current table rendering models…used by web browsers are insane (in the sense they are buggy, not interoperable and not CSSish at all). Many usual CSS assumptions are broken, and renderings diverge widely.
(强调已添加。)
当前草案中有更多信息,但 CSS 工作组承认 (1) 浏览器实现不一致,(2) 即使是他们自己当前的提案也不充分。
关于html - 折叠边框模型在网络浏览器中的实现是否有效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35206085/
我需要能够在我的 javascript 中折叠/折叠各种代码片段,有点像 C# 中的#region #endregion。我找不到执行此操作的方法,有什么帮助吗? 最佳答案 窗口菜单 -> 选择首选项
折叠 Accordion 时,我注意到在这段时间内没有显示边框。例如,当 Accordion 展开时,我们会在展开时看到边界。这也可以在折叠 Accordion 时完成吗? Accordion 折叠时
是否有任何插件或快捷方式可以隐藏 Sublime Text 2 中除代码部分之外的所有内容? 我需要一次折叠除部分之外的所有部分,而不是一次折叠一个部分。 谢谢~ 最佳答案 如果将鼠标悬停在行号上,您
在 Web 应用程序中,我有一个操作可能会以各种不同的方式失败,或者最终会成功。 在这种情况下,成功和失败由 SimpleResult 的子类表示(表示 HTTP 响应) 我使用 scalaz/上的
我的数据在这样的分组方案中分为三个连续的类别: 因此,整个“OCM”组被分解为名为“N/A”、“Financials”、“Industrials”等的子组,每个子组又被分解为进一步的子组。 我在 Ex
我正在尝试猫图书馆,但我很难在我应该导入和创建的东西之间导航。我的问题如下: sealed trait Checks case class CheckViolation(id: Long, msg:
有没有办法查看当前文件中打开的折叠位置? 我个人在打开折叠和移动时遇到问题,我无法找到折叠开始的线!也许有一个选项可以在数字旁边设置一个漂亮的折叠提示。也许是这样的: + 1 void myfunc(
我正在寻找一种按空白深度折叠纯文本的方法。我更喜欢 Notepad++ 解决方案,但如果它只能在另一个编辑器中完成,我可以处理。例如 Header is arbitrary text Child i
今天早上我遇到了优秀的 jstree jQuery UI 插件。一句话——太棒了!它易于使用,易于样式化,并且可以按照包装盒上的说明进行操作。我还没有弄清楚的一件事是 - 在我的应用程序中,我想确
我有以下XAML,其中堆叠了三个组框。这些组框的标题中是复选框。 我想要实现的是:当我选中/取消选中一个框时,我希望相应的groupbox能够以平滑的动画缓慢展开/折叠。 我正在Blend 4中尝试此
我知道如何使用 zO 打开光标下的所有折叠. 但是反向怎么做呢? 我想要类似 za 的东西确实如此,但也具有递归性。 附注。我知道有 zC ,但它会关闭与当前行相关的所有父级折叠,我想关闭子级。 最佳
我试图防止点击 About Us 时导航栏崩溃部分或 Projects以下代码中的部分。我已经尝试过event.stopPropagation()在这两个按钮上,但是当 jQuery 代码执行时,导航
我有一个DataGrid。它具有DataGrid.RowDetailsTemplate。当单击一个按钮时,它应该展开/折叠;我该怎么做?
我有一个 Storyboard动画,使用Opacity属性可以使控件淡出 View 。完成后,我想将控件的“可见性”设置为“折叠”。 我也想做相反的事情...将“可见性”设置为“可见”,然后使用 St
我将 SublimeText3 用于 C++ 和 Java。我想知道是否有办法折叠文件/类中的所有方法,然后将它们全部展开,而不管插入符号在哪里。或者有没有办法列出所有的功能/方法。 基本上我希望能够
如何在 YAML 中断开长字符串(如长 url 或文件名/路径),而不会将换行符变成空格? 示例输入: url: > https://example.com/?what=Lorem %20ip
给定: import shapeless._ case class F(x: Option[Int], y: Option[Int]) 我想帮忙写一个函数,f: def f(Option[Int]::
我想测试数组是否仅包含唯一元素,我的解决方案如下: function uniqueElements(a) { var r = true; while (a) { var [el, a]
我试图在单击“项目”按钮时使“javascript 项目”和“CGI 项目”滑动切换。但是,我不太明白为什么点击时只有CGI项目按钮切换,而javascript项目按钮保持不变? 我正在尝试使用 Jq
我有一组需要在 UI 中显示的项目,例如标题和其下的项目列表。 有一个父组件,我将在其中将此数据传递到如下所示的文件. 在此基础上显示了父子布局。 现在我需要根据标题的点击展开/折叠。 有一个可以附加
我是一名优秀的程序员,十分优秀!