有序列表,以 XHTML 严格开始索引?
有没有办法在遵循 XHTML Strict 的同时从特定索引开始有序列表? 使用 start=n 效果很好,但已被弃用…预期目的是恢复带分页的索引。
我看到了一些对 CSS 解决方案的引用,但是起始索引不能像已弃用的 start 情况中的属性一样使用。
Is there a way to start an ordered list from a specific index while following XHTML Strict? Using start=n works well, but has been deprecated… The intended purpose is to resume the index with paging.
I saw a few references to a CSS solution, but the starting index cannot be used like the attribute in the deprecated case of start.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如 kdgregory 指出的,计数器将是完成此操作并仍然保留有效的文档。 Array Studio 上的这篇文章展示了如何使用 XHTML 和 CSS 进行编码。 以下内容是从他们的文章中复制的:
As kdgregory noted, counters would be the way to accomplish this and still maintain a valid document. This article on Array Studio shows how to code this in XHTML and CSS. The following is copied from their article:
您绝对可以使用计数器,但也许更实用的解决方案是使用 XHTML Transitional 文档类型。 我知道这并不能回答你的问题,但在这种情况下,你最终可能会在墙上和天花板上编写代码,去做一些对你没有多大好处的事情。
You could definitely use counters but maybe a more practical solution would be to use an XHTML Transitional doctype. I know this doesn't answer your question but this is one of those situations where you can end up coding up the walls and across the ceiling to do something that doesn't gain you much.
CSS 解决方案是使用列表计数器:http://www.w3。 org/TR/CSS2/generate.html#counters
看来,为了支持分页,您可以简单地将硬编码的
The CSS solution is to use a list counter: http://www.w3.org/TR/CSS2/generate.html#counters
And it seems that, to support paging, you could simply put a hardcoded <style> element into the <head>, or set the style explicitly on the element (haven't tried either, so ymmv).