开发者

Why need specify following styles when using VML?

I am learning VML right now. And I noticed that each example contains two style definition as following:

        v\:* { behavior: url(#default#VML);}

        o\:* { behavior: url(#default#VML);}

I know the {behavior:url(#default#VML) means appl开发者_开发技巧y the behaviour on the elements selected by v\:*. But I do not known what kind of elements do the v\:* select. And what is the behaviour #default#VML.


Because VML is an XML based aproach, it needs a seperate namespace for all its elements. To use a prefix in XML, a namespace needs to be declared. This one may look familiar:

<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />

The namespace used for VML is commonly prefixed using the letter "v" but it could be anything. The CSS selector v\:* simply selects any element (* stand for "any") prefixed with the letter "v". The backslash is just there to escape the colon.

VML is so called "Default Behaviour", predefined by the browser. The #default tells the browser to access build-in functionality, #VML specifies which behavior.

Over at the The MSDN Library you can find more details on Using DHTML Behaviors and the behavior Attribute.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜