为什么SVG图像的标签不同? [英] why a different tag for SVG images?

查看:51
本文介绍了为什么SVG图像的标签不同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么SVG需要与其他图像不同的标签?


恕我直言,SVG应该像任何其他图像一样实现为图像类型

类型,允许它与< img>一起使用标签,...这里是重要的

部分...也可以使用其他标签中的背景。


我没有看到任何制作的智慧SVG不同于说PNG(当然

渲染代码的实现会明显不同)。


-

-------------------------------------------------- ---------------------------

| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |

| (名字)在ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |

--------- -------------------------------------------------- ------------------

Why does SVG need a different tag than other images?

IMHO, SVG should be implemented as an image type just like any other image
type, allowing it to work with <img> tags, and ... here is the important
part ... also work with backgrounds in other tags.

I fail to see any wisdom in making SVG different than say PNG (of course
the implementation of the rendering code would obvious be different).

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------

推荐答案

ph ************** @ ipal.net 写道:
ph**************@ipal.net wrote:
为什么SVG需要与其他图像不同的标签?


从规范角度来看,理论上所有嵌入式内容都不应该使用< object>元件。由于IE对嵌入

gif,png和jpeg的支持不足,所以< img>元素仍然广泛使用。
恕我直言,SVG应该像任何其他图像类型一样实现为图像类型,允许它与< IMG>标签,...这里是重要的
部分...也适用于其他标签中的背景。
Why does SVG need a different tag than other images?
It doesn''t from a spec perspective, in theory all embedded content
should use the <object> element. Due to IE''s poor support for embedding
gif, png and jpeg with that element the <img> element is still widely
used.
IMHO, SVG should be implemented as an image type just like any other image
type, allowing it to work with <img> tags, and ... here is the important
part ... also work with backgrounds in other tags.




背景不是内容,因此它们应该用CSS指定。

这需要在浏览器中支持原生SVG,具有

原生SVG支持的浏览器目前不支持在CSS中指定SVG。


-

Spartanicus



Backgrounds are not content, hence they should be specified with CSS.
This requires native SVG support in browsers, the browsers that have
native SVG support do not currently support SVG to be specified in CSS.

--
Spartanicus


2006年4月4日星期二06:10:36 GMT Spartanicus< in*****@invalid.invalid>写道:

| ph ************** @ ipal.net 写道:

|

|>为什么SVG需要与其他图像不同的标签?

|

|它从规范的角度来看,理论上所有嵌入的内容都不是b $ b |应该使用< object>元件。由于IE对嵌入的支持不足

|带有该元素的gif,png和jpeg< img>元素仍然广泛

|用过。


为什么要换一个新的?为什么不离开< img>为

所有对象类型和< object>做同样的工作是一个等价物。

|>恕我直言,SVG应该像任何其他图像一样实现为图像类型

|>类型,允许它与< IMG>标签,和...这里是重要的

|>部分...也可以使用其他标签中的背景。

|

|背景不是内容,因此应使用CSS指定。

|这需要在浏览器中支持原生SVG,浏览器需要

|原生SVG支持目前不支持在CSS中指定SVG。


我不同意。它是分层内容......对图层有限制。


然后,每个表格单元格上都需要设置一个标签名称,这将变得非常复杂并将其与CSS中的规范相关联,即

仅对该页面有用。 CSS应该是一个通用模板,而不是必须为每个复杂页面定制的
。这是原来打算用的原因。我们今天所拥有的是如此卑鄙。


应该可以让客户端的最终用户拥有自己的

CSS并且它可以正常运行给定页面。当CSS首次出现在1990年代时,这是理想的状态。似乎有人忘记了

所有这一切。现在我们正在将内容移动到CSS中。


而在CSS上,为什么不用XML样式语法?如果XML现在几乎所有其他东西都足够好了,为什么不用CSS?

复杂结构化网站的一个大问题是动态的

生成的是生成2个同步输出流的复杂性。

必须生成2个流(HTML和CSS)已经够糟糕了(

通常是在单独的实例中生成的,这使得它在动态内容每次更改时更难以保持同步,但普通的XML工具不能用于生成CSS。


-

----------------------- -------------------------------------------------- ----

| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |

| (名字)在ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |

--------- -------------------------------------------------- ------------------
On Tue, 04 Apr 2006 06:10:36 GMT Spartanicus <in*****@invalid.invalid> wrote:
| ph**************@ipal.net wrote:
|
|>Why does SVG need a different tag than other images?
|
| It doesn''t from a spec perspective, in theory all embedded content
| should use the <object> element. Due to IE''s poor support for embedding
| gif, png and jpeg with that element the <img> element is still widely
| used.

Why even make a new one? Why not have left <img> to do the same job for
all object types, and <object> be an equivalent.
|>IMHO, SVG should be implemented as an image type just like any other image
|>type, allowing it to work with <img> tags, and ... here is the important
|>part ... also work with backgrounds in other tags.
|
| Backgrounds are not content, hence they should be specified with CSS.
| This requires native SVG support in browsers, the browsers that have
| native SVG support do not currently support SVG to be specified in CSS.

I disagree. It is layered content ... with a limitation on layers.

And then it becomes immensely complex to have to put a tag name on
every table cell and associate it with a specification in CSS that is
only useful for that one page. CSS should be a general template, not
something that has to be custom made for each complex page. That''s
what it was original intended for. What we have today is so bastardized.

It should be possible to let the end user at the client have their own
CSS and it function correctly with any given page. That was the ideal
state when CSS was first being born in the 1990''s. Seems someone forgot
all that along the way. Now we''re moving content into CSS.

And while on CSS, why wasn''t it made with an XML style syntax? If XML is
good enough for just about everything else these days, why not for CSS?
One of the big problems with complex structured sites being dynamically
generated is the complexity of generating 2 simultaneous output streams.
It''s bad enough that 2 streams (HTML and CSS) have to be generated (and
usually generated in separate instances, which makes it all that much
harder to keep them in sync when dynamic content is changing at every
second), but normal XML tools cannot be used to generate CSS.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------


2006年4月4日星期二, ph ************** @ ipal.net 写道:
On Tue, 4 Apr 2006, ph**************@ipal.net wrote:
为什么要制作新的?为什么不离开< img>为所有对象类型执行相同的工作,并且< object>是一个等价物。


天哪,不! < img ...>是 - 而且总是 - 设计糟糕。来自即时满足之家的
,而不是来自

基本声音的部门。


命运多HTML的HTML / 3.0草案已经认识到了这一点,并试图将b $ b引入< fig ...>要替换它的元素。那,在适当的时候,

成为< object ...>的W3C部分。元件。这本来可以用来定义一个对象的嵌套变体,最后回落到

格式正确的文本(这是一个可怜的img标签''的替代品'alt' ;

属性无法做到。)


也就是说,如果f * up仙女没有介入,并且给了W3C
< object>来自专有供应商的死亡之吻的元素,

使它在一般的网络环境中基本无用。

|>恕我直言,SVG应该实现为图像类型就像任何
其他图像|>类型一样,允许它与< img>一起使用标签,和......
这里是重要的|>部分......也适用于其他
标签中的背景。 | |背景不是内容,因此它们应该用CSS指定。 |这需要在浏览器中支持原生SVG,具有|的浏览器原生SVG支持目前不支持在CSS中指定SVG。


(对不起那里的格式化 - 我的错)

我不同意。


这不是同意或不同意的问题 - 这是

的结果。确定事物的方式。

它是分层内容......对图层有限制。


我看到你得到了什么,但这不是它的定义。


你'如果你想得到你在那里描述的
,我必须开始一个全新的发展。目前,我会说从内容中分离

演示文稿。正在做着它在锡上说的话;我们认为一些人工作得很好,而另一些人则认为他们有能力保证他们尝试DTP演示。

应该可以让客户端的最终用户拥有自己的CSS,并且它可以在任何给定的页面上正常运行。这是CSS在1990年代首次诞生时的理想状态。


....我们回到那里,尽管

HTML / 3.2和专有geegaws在此期间造成了所有伤害...

似乎有人忘记了所有这一切。现在我们将内容移到CSS中。
Why even make a new one? Why not have left <img> to do the same job for
all object types, and <object> be an equivalent.
Heavens, no! <img ...> is - and always was - badly designed. Came
from the house of instant gratification, not from the department of
fundamentally sound.

The ill-fated HTML/3.0 draft had already recognised that, and tried to
introduce a <fig...> element to replace it. That, in due course,
became the W3C part of the <object...> element. Which could have been
used to define nested variants of an object, falling-back finally to
properly formatted text (something which the wretched img tag''s "alt"
attribute is incapable of doing).

That is, if the f*up fairy hadn''t intervened, and gifted the W3C
<object> element with the kiss of death from a proprietary vendor,
making it essentially useless in a general web context.
|>IMHO, SVG should be implemented as an image type just like any
other image |>type, allowing it to work with <img> tags, and ...
here is the important |>part ... also work with backgrounds in other
tags. | | Backgrounds are not content, hence they should be
specified with CSS. | This requires native SVG support in browsers,
the browsers that have | native SVG support do not currently support
SVG to be specified in CSS.
(sorry about the disformatting there - my fault)
I disagree.
It''s not a matter of agreeing or disagreeing - it''s a consequence of
the way things have been defined.
It is layered content ... with a limitation on layers.
I see what you''re getting at, but that isn''t how it''s been defined.

You''d have to start a whole new development if you wanted to get what
you''re describing there. At the moment, I''d say the "separation of
presentation from content" is doing what it says on the tin; some of
us think that''s working well, while others feel that it''s defeating
their ability to guarantee their attempts at DTP presentation.
It should be possible to let the end user at the client have their
own CSS and it function correctly with any given page. That was the
ideal state when CSS was first being born in the 1990''s.
....and we''re getting back there, despite all the harm that was done by
HTML/3.2 and proprietary geegaws in the meantime...
Seems someone forgot all that along the way. Now we''re moving
content into CSS.




我不这么认为。无论如何,那些正在尝试这种情况的人通常会被判为错误。 (x)HTML代表内容,样式表是

用于演示。


[...我不动的问题评论...]


一开始没有人说样式表*有*是CSS。

是其他可能性。但CSS目前是我们可以选择的b $ b选择 - 无论你对它的看法如何。



I don''t think so. Those who are trying that on are generally rated to
be in error, anyway. (x)HTML is for the content, the stylesheet is
meant for the presentation.

[...snipped questions that I''m not moved to comment on...]

Nobody said at the outset that the stylesheet *had* to be CSS. There
were other possibilities mooted. But CSS is currently what we get to
choose from - whatever your opinion of it may be.


这篇关于为什么SVG图像的标签不同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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