对齐=“右"不适用于 XML [英] align="right" doesn't work in XML

查看:33
本文介绍了对齐=“右"不适用于 XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前从未使用过 XML,现在我必须更改文本的对齐方式.我试着像在 HTML 中那样做,但它没有发生.也许我做错了什么?这是他的脚本:

I've never used XML before, and now I must change the align of text. I try to do it like in HTML, but it doesn't happen. Maybe I do something wrong? Here is he script:

<gallery>
    <title><![CDATA[<FONT SIZE="20" COLOR="#C3A25D"></FONT>]]></title>
    <text><![CDATA[<FONT SIZE="20" COLOR="#C3A25D">text, which i want to to be in right position</FONT>]]></text>
    <thmb></thmb>
    <img wdt="421">images/avetiskhakhamyan.jpg</img>
</gallery>

我尝试在 <font> 标签中编写 align="right",但它不起作用.你能告诉我有什么问题吗?

I try to write align="right" in <font> tag, but it deosn't work. Could you tell me what is the problem?

而且我无论如何都无法理解,如果我不设置任何 align 属性,为什么它会在中心显示文本?是默认值吗?

And I can't understand anyway, if I don't set any align attribute, why it show text in center? is it the default value?

推荐答案

XML 不是一种显示格式.它不会理解"对齐.

XML is not a display format. It doesn't not "understand" alignments.

就 XML 而言,align="right" 是一个名为 align 的属性,其值为 right.注意到更多,没有更少.

As far as XML is concerned, align="right" is an attribute named align with the value right. Noting more and nothing less.

这篇关于对齐=“右"不适用于 XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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